зеркало из https://github.com/mozilla/gecko-dev.git
LC_ALL -> LC_CTYPE (LC_ALL returns multiple values on some Unixes).
"" -> NULL (pass NULL to setlocale to query). "locale." -> "locale.all." (someone forgot the "all." part of the key).
This commit is contained in:
Родитель
fdd462c57a
Коммит
7a833358ff
|
@ -49,7 +49,7 @@ nsUNIXCharset::nsUNIXCharset()
|
|||
NS_INIT_REFCNT();
|
||||
PR_AtomicIncrement(&g_InstanceCount);
|
||||
|
||||
char* locale = setlocale(LC_ALL, "");
|
||||
char* locale = setlocale(LC_CTYPE, NULL);
|
||||
if(locale)
|
||||
{
|
||||
nsAutoString propertyURL("resource://res/unixcharset.properties");
|
||||
|
@ -62,7 +62,7 @@ nsUNIXCharset::nsUNIXCharset()
|
|||
|
||||
nsresult res = info->Get(platformLocaleKey, mCharset);
|
||||
if(NS_FAILED(res)) {
|
||||
nsAutoString localeKey("locale.");
|
||||
nsAutoString localeKey("locale.all.");
|
||||
localeKey.Append(locale);
|
||||
nsresult res = info->Get(localeKey, mCharset);
|
||||
if(NS_SUCCEEDED(res)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче