|
From: | lrn1986 |
Subject: | Re: Default Windows locale for localename.c |
Date: | Thu, 15 Mar 2018 19:45:11 +0300 |
User-agent: | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:59.0) Gecko/20100101 Thunderbird/59.0 |
On 15.03.2018 11:37, Eli Zaretskii wrote:
Cc: Eli Zaretskii From: LRN Date: Tue, 13 Mar 2018 23:45:08 +0300And what does setlocale(LC_ALL,NULL) return on that system?It returns "C".Really? That's strange.Sorry, I guess I didn't make myself clear enough. Every C program starts with a C locale; what I meant is what does setlocale return after you do this: setlocale (LC_ALL, ""); I expect it to return "English_United States.1251" in all the categories.
Nope, after i call setlocale (LC_ALL, ""), all subsequent calls to setlocale(category, NULL) return "Russian_Russia.1251".
If that's what happens in your case, then the only problem with gettext is that it doesn't call gl_locale_name, but instead calls gl_locale_name_posix directly. I'd say it's a gettext bug.
gl_locale_name() calls gl_locale_name_thread(), which returns the result of setlocale(category, NULL) for all supported categories (i.e. for everything except LC_MESSAGES; it returns NULL for those). If it returns NULL, then the rest of it is the same as what gettext does (posix, then default).
signature.asc
Description: OpenPGP digital signature
[Prev in Thread] | Current Thread | [Next in Thread] |