Alexandre Julliard : kernelbase: Reimplement LOCALE_*DEFAULTCODEPAGE 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: b1e17a053a66d06532aa0b8258569d5efc51a806
URL: https://source.winehq.org/git/wine.git/?a=commit;h=b1e17a053a66d06532aa0b8258569d5efc51a806
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Mar 28 12:42:21 2022 +0200
kernelbase: Reimplement LOCALE_*DEFAULTCODEPAGE in GetLocaleInfoW/Ex using the locale.nls data.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/kernelbase/locale.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/dlls/kernelbase/locale.c b/dlls/kernelbase/locale.c
index 2e512240b2b..7f8c51a8414 100644
--- a/dlls/kernelbase/locale.c
+++ b/dlls/kernelbase/locale.c
@@ -932,7 +932,8 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ
return -1;
case LOCALE_IDEFAULTCODEPAGE:
- return -1;
+ val = locale->idefaultcodepage == CP_UTF8 ? CP_OEMCP : locale->idefaultcodepage;
+ return locale_return_number( val, type, buffer, len );
case LOCALE_SLIST:
return -1;
@@ -1213,7 +1214,8 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ
return -1;
case LOCALE_IDEFAULTANSICODEPAGE:
- return -1;
+ val = locale->idefaultansicodepage == CP_UTF8 ? CP_ACP : locale->idefaultansicodepage;
+ return locale_return_number( val, type, buffer, len );
case LOCALE_ITIMEMARKPOSN:
return -1;
@@ -1252,10 +1254,11 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ
return -1;
case LOCALE_IDEFAULTMACCODEPAGE:
- return -1;
+ val = locale->idefaultmaccodepage == CP_UTF8 ? CP_MACCP : locale->idefaultmaccodepage;
+ return locale_return_number( val, type, buffer, len );
case LOCALE_IDEFAULTEBCDICCODEPAGE:
- return -1;
+ return locale_return_number( locale->idefaultebcdiccodepage, type, buffer, len );
case LOCALE_SSORTNAME:
return -1;
More information about the wine-cvs
mailing list