Re: Question about ICU Converter Explorer

George Rhoten <[email protected]> Tue, 20 Jul 2004 14:59:43 -0700
Newsgroups gmane.comp.lib.icu.general
Message-ID <OFD112E8CE.2A104C1F-ON86256ED7.00778EAC-88256ED7.0078D261@us.ibm.com>
If you want an example of how to achieve this result, you can look at the 
source code directly.

http://oss.software.ibm.com/cvs/icu/~checkout~/icuapps/convexp/convexp.cpp

The printLanguages function will be of interest to you from that file. 
Specifically, you will probably be interested in how it uses these two 
functions: ucnv_getUnicodeSet from ucnv.h and ulocdata_getExemplarSet from 
ulocdata.h.  You will need to use the functions from uset.h to establish 
the link between codepages and languages.

You could also use the help link at the top of each page, which tells you 
which functions where used to get that list of languages.  In this case, 
it says it in the last item at the bottom of the Converter Explorer help 
page.

George Rhoten
IBM Globalization Center of Competency/ICU  San José, CA, USA
ICU main website: http://oss.software.ibm.com/icu/index.html



Joshua Hadley <[email protected]> 
Sent by: [email protected]
07/20/2004 11:59 AM

To
[email protected]
cc

Subject
Question about ICU Converter Explorer






Warning: I'm relatively new to ICU (though not to Unicode), and a 
considerably-less-than-expert programmer, so please be gentle!

I was wondering if someone would be kind enough to provide a general 
description or breakdown or even just some hints on how to get the 
"List of Languages Representable by This Codepage" as in the ICU 
Converter Explorer demo at 
http://oss.software.ibm.com/cgi-bin/icu/convexp (click on an Internal 
Converter Name link, then go to List of Languages toward the bottom). 
In a nutshell: how can I obtain a list of languages that a given 
codepage supports?

I've been looking in the ucnv.h and uloc.h documentation and I can use 
the functions no problem; what I'm not getting is how to establish the 
link between Converter/codepage -> Locale (and subsequently -> 
language(s)). With any luck I'm just overlooking something obvious and 
someone can just whack me on the head and set me in the right direction 
-- I'd appreciate that ;-)


Kind regards,

Joshua Hadley
Ascender Corporation
http://www.ascendercorp.com

_______________________________________________
icu mailing list
[email protected]
http://oss.software.ibm.com/developerworks/oss/mailman/listinfo/icu