Used by Marvel's Avengers.
Signed-off-by: Paul Gofman pgofman@codeweavers.com --- dlls/msvcrt/locale.c | 9 +++++++++ dlls/msvcrt/tests/locale.c | 9 +++++++++ 2 files changed, 18 insertions(+)
diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c index 9a10ceabc4e..3af733ec7bc 100644 --- a/dlls/msvcrt/locale.c +++ b/dlls/msvcrt/locale.c @@ -1135,6 +1135,15 @@ static MSVCRT_pthreadlocinfo create_locinfo(int category, |LOCALE_NOUSEROVERRIDE, buf, sizeof(buf)); cp[0] = atoi(buf);
+ for(i=1; i<6; i++) { + lcid[i] = lcid[0]; + cp[i] = cp[0]; + } + } else if (locale[0] == '.' && locale[1] == 'O' && locale[2] == 'C' && locale[3] == 'P' && !locale[4]) { + lcid[0] = GetUserDefaultLCID(); + GetLocaleInfoA(lcid[0], LOCALE_IDEFAULTCODEPAGE, buf, sizeof(buf)); + cp[0] = atoi(buf); + for(i=1; i<6; i++) { lcid[i] = lcid[0]; cp[i] = cp[0]; diff --git a/dlls/msvcrt/tests/locale.c b/dlls/msvcrt/tests/locale.c index 08abac00bed..47742290faf 100644 --- a/dlls/msvcrt/tests/locale.c +++ b/dlls/msvcrt/tests/locale.c @@ -612,6 +612,15 @@ static void test_setlocale(void) ok(!strcmp(ret, buf), "ret = %s, expected %s\n", ret, buf); }
+ ret = setlocale(LC_ALL, ".OCP"); + ok(ret != NULL, "ret == NULL\n"); + if(ret) { + char *cp = strchr(ret, '.'); + + GetLocaleInfoA(GetUserDefaultLCID(), LOCALE_IDEFAULTCODEPAGE, buf, sizeof(buf)); + ok(cp && !strcmp(cp + 1, buf), "ret %s, buf %s.\n", ret, buf); + } + ret = setlocale(LC_ALL, "English_United States.UTF8"); ok(ret == NULL, "ret != NULL\n");