From 5a36515921307721ed70b7ae8c22cce0786de963 Mon Sep 17 00:00:00 2001 From: Daniel Lehman Date: Tue, 1 May 2018 14:34:21 -0700 Subject: [PATCH 4/4] msvcr110: Try SNAME when matching locale. Signed-off-by: Daniel Lehman --- dlls/msvcr110/tests/msvcr110.c | 6 +++--- dlls/msvcrt/locale.c | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/dlls/msvcr110/tests/msvcr110.c b/dlls/msvcr110/tests/msvcr110.c index 6b8f327fb86..ac89ebe8e6f 100644 --- a/dlls/msvcr110/tests/msvcr110.c +++ b/dlls/msvcr110/tests/msvcr110.c @@ -63,9 +63,9 @@ static void test_setlocale(void) for(i=0; i= 110 + /* Check - */ + if (compare_info(lcid,LOCALE_SNAME,buff,res->search_language, TRUE)) + { + TRACE(":Found locale: %s->%s\n", res->search_language, buff); + flags |= FOUND_LANGUAGE | FOUND_COUNTRY; + } + else if ((res->match_flags & (FOUND_LANGUAGE | FOUND_COUNTRY)) == (FOUND_LANGUAGE | FOUND_COUNTRY)) + { + return CONTINUE_LOOKING; + } + else + { +#endif /* Check Language */ if (compare_info(lcid,LOCALE_SISO639LANGNAME,buff,res->search_language, TRUE) || compare_info(lcid,LOCALE_SABBREVLANGNAME,buff,res->search_language, TRUE) || @@ -179,6 +193,9 @@ find_best_locale_proc(HMODULE hModule, LPCSTR type, LPCSTR name, WORD LangID, LO { return CONTINUE_LOOKING; } +#if _MSVCR_VER >= 110 + } +#endif /* Check codepage */ if (compare_info(lcid,LOCALE_IDEFAULTCODEPAGE,buff,res->search_codepage, TRUE) || -- 2.17.0