Alexandre Julliard : kernelbase: Reimplement LOCALE_*CTRYNAME in GetLocaleInfoW/Ex using the locale.nls data.
Alexandre Julliard
julliard at winehq.org
Mon Mar 28 15:53:40 CDT 2022
Module: wine
Branch: master
Commit: 2c70ed249ab393f8cb1e522bbd6cf299afe82906
URL: https://source.winehq.org/git/wine.git/?a=commit;h=2c70ed249ab393f8cb1e522bbd6cf299afe82906
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Mar 28 12:27:45 2022 +0200
kernelbase: Reimplement LOCALE_*CTRYNAME in GetLocaleInfoW/Ex using the locale.nls data.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/kernelbase/locale.c | 13 +++++++------
dlls/msvcrt/locale.c | 3 ---
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/dlls/kernelbase/locale.c b/dlls/kernelbase/locale.c
index 0caf790384c..2faec8136b9 100644
--- a/dlls/kernelbase/locale.c
+++ b/dlls/kernelbase/locale.c
@@ -915,13 +915,14 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ
return -1;
case LOCALE_SLOCALIZEDCOUNTRYNAME:
- return -1;
+ /* FIXME: localization */
+ return locale_return_string( locale->sengcountry, type, buffer, len );
case LOCALE_SABBREVCTRYNAME:
- return -1;
+ return locale_return_string( locale->sabbrevctryname, type, buffer, len );
case LOCALE_SNATIVECTRYNAME:
- return -1;
+ return locale_return_string( locale->snativectryname, type, buffer, len );
case LOCALE_IDEFAULTLANGUAGE:
return locale_return_number( locale->idefaultlanguage, type, buffer, len );
@@ -1097,7 +1098,7 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ
return locale_return_string( locale->siso639langname, type, buffer, len );
case LOCALE_SISO3166CTRYNAME:
- return -1;
+ return locale_return_string( locale->siso3166ctryname, type, buffer, len );
case LOCALE_IGEOID:
return -1;
@@ -1129,7 +1130,7 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ
return locale_return_string( locale->siso639langname2, type, buffer, len );
case LOCALE_SISO3166CTRYNAME2:
- return -1;
+ return locale_return_string( locale->siso3166ctryname2, type, buffer, len );
case LOCALE_SNAN:
return -1;
@@ -1205,7 +1206,7 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ
return locale_return_string( locale->senglanguage, type, buffer, len );
case LOCALE_SENGCOUNTRY:
- return -1;
+ return locale_return_string( locale->sengcountry, type, buffer, len );
case LOCALE_STIMEFORMAT:
return -1;
diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c
index e800e7142c8..037660d0a91 100644
--- a/dlls/msvcrt/locale.c
+++ b/dlls/msvcrt/locale.c
@@ -363,9 +363,6 @@ LCID locale_to_LCID(const char *locale, unsigned short *codepage, BOOL *sname)
search.allow_sname = TRUE;
}
- if(!_stricmp(search.search_country, "China"))
- strcpy(search.search_country, "People's Republic of China");
-
EnumResourceLanguagesA(GetModuleHandleA("KERNEL32"), (LPSTR)RT_STRING,
(LPCSTR)LOCALE_ILANGUAGE,find_best_locale_proc,
(LONG_PTR)&search);
More information about the wine-cvs
mailing list