Piotr Caban : ucrtbase: Add support for utf8 codepage in setlocale.
Alexandre Julliard
julliard at winehq.org
Wed Nov 11 15:31:43 CST 2020
Module: wine
Branch: master
Commit: e460b37a25226f36b973a66b613e2542b1f9cc16
URL: https://source.winehq.org/git/wine.git/?a=commit;h=e460b37a25226f36b973a66b613e2542b1f9cc16
Author: Piotr Caban <piotr at codeweavers.com>
Date: Wed Nov 11 18:49:08 2020 +0100
ucrtbase: Add support for utf8 codepage in setlocale.
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/msvcrt/locale.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c
index c49439951a9..fda3d11b86d 100644
--- a/dlls/msvcrt/locale.c
+++ b/dlls/msvcrt/locale.c
@@ -351,6 +351,11 @@ LCID MSVCRT_locale_to_LCID(const char *locale, unsigned short *codepage, BOOL *s
} else if (!MSVCRT__strnicmp(cp, ".OCP", 4)) {
GetLocaleInfoW(lcid, LOCALE_IDEFAULTCODEPAGE | LOCALE_RETURN_NUMBER,
(WCHAR *)&locale_cp, sizeof(DWORD)/sizeof(WCHAR));
+#if _MSVCR_VER >= 140
+ } else if (!MSVCRT__strnicmp(cp, ".UTF-8", 6)
+ || !MSVCRT__strnicmp(cp, ".UTF8", 5)) {
+ locale_cp = CP_UTF8;
+#endif
} else {
locale_cp = atoi(cp + 1);
}
More information about the wine-cvs
mailing list