Am Wed, 15 Dec 2004 12:43:10 -0500 schrieb Michael Jennings:
First off, it's setlocale(LC_ALL, ""), not setlocale(LC_ALL, NULL). :)
Secondly, once you've done that, you cannot assume that the returned locale string is any particular value. From the man page:
RETURN VALUE A successful call to setlocale() returns an opaque string that corresponds to the locale set.
"Opaque" means "don't look at this thing." :)
Use nl_langinfo(CODESET) to get the character encoding being used.
But this function returns for my locale ([EMAIL PROTECTED]) ISO-8859-15. I know this is the character encoding I use, but perhaps a lot of languages use the same character encoding or not? I need this value only to exec the correct help files for the users language. Perhaps my understanding of locales and character encoding is wrong.
You need to figure out the language to get the correct translation (gettext, other stuff?), and the encoding which is used by X to look up the appropriate font. They are kind of separate but linked issues. Most of this should go on behind the scenes. You could take a look at the first few lines in LangInit() in e16/e/src/lang.c, which I believe gets it right most of the time.
/Kim
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
enlightenment-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel