ICU default locale and setlocale
"Zartaj T. Majeed" <[email protected]>
| Newsgroups | gmane.comp.lib.icu.general |
|---|---|
| Message-ID | <[email protected]> |
The following applies to Unix and other systems providing setlocale. The ICU default locale seems to not take into account setlocale calls in a program. The default locale remains whatever was in effect the first time the default locale was set. I would like to have the default locale reflect the program's current locale. Also related is the behavior of ucnv_setDefaultName. It returns the encoding associated with the default locale if that can be determined; if not it returns the value of the LC_CTYPE environment variable by doing setlocale(LC_CTYPE, ""). The setlocale call should instead be setlocale(LC_CTYPE, NULL) so that again the program's current locale is taken into account and not the locale in effect when the program was launched. Thanks, Zartaj