Commit e460b37a authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

ucrtbase: Add support for utf8 codepage in setlocale.

parent 8ea89841
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment