John Zourlios : kernelbase: Accept LINGUISTIC_IGNOREDIACRITIC & SORT_DIGITSASNUMBERS in CompareStringEx().

Alexandre Julliard julliard at winehq.org
Tue Oct 26 09:40:25 CDT 2021


Module: wine
Branch: stable
Commit: 678d118c42371ce3741de1dd0c5a621526bf4ab7
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=678d118c42371ce3741de1dd0c5a621526bf4ab7

Author: John Zourlios <john.kinigos at gmail.com>
Date:   Sat Mar 20 17:58:44 2021 +0100

kernelbase: Accept LINGUISTIC_IGNOREDIACRITIC & SORT_DIGITSASNUMBERS in CompareStringEx().

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50362
Signed-off-by: Gijs Vermeulen <gijsvrm at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 0a366f7e4a68c9375b54ace5289989bd81b65d22)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 dlls/kernel32/tests/locale.c | 5 +----
 dlls/kernelbase/locale.c     | 3 ++-
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c
index 17734bb24bf..0215b0d2d00 100644
--- a/dlls/kernel32/tests/locale.c
+++ b/dlls/kernel32/tests/locale.c
@@ -1859,12 +1859,9 @@ static void test_CompareStringA(void)
       SetLastError(0xdeadbeef);
       ret = CompareStringA(entry->lcid, entry->flags, entry->first, entry->first_len,
           entry->second, entry->second_len);
-todo_wine_if (entry->flags == LINGUISTIC_IGNOREDIACRITIC)
-{
       ok(ret == entry->ret, "%d: got %d, expected %d\n", i, ret, entry->ret);
       ok(GetLastError() == (ret ? 0xdeadbeef : entry->le), "%d: got last error %d, expected %d\n",
           i, GetLastError(), (ret ? 0xdeadbeef : entry->le));
-}
   }
 
   ret = CompareStringA(lcid, NORM_IGNORECASE, "Salut", -1, "Salute", -1);
@@ -2031,7 +2028,7 @@ static void test_CompareStringW(void)
 
     SetLastError(0xdeadbeef);
     ret = CompareStringW(CP_ACP, SORT_DIGITSASNUMBERS, L"NULL", -1, L"NULL", -1);
-    todo_wine ok(ret == CSTR_EQUAL || broken(!ret && GetLastError() == ERROR_INVALID_FLAGS) /* <Win7 */,
+    ok(ret == CSTR_EQUAL || broken(!ret && GetLastError() == ERROR_INVALID_FLAGS) /* <Win7 */,
         "expected CSTR_EQUAL, got %d, last error %d\n", ret, GetLastError());
 
     ret = CompareStringW(CP_ACP, 0, ABC_EE, 3, ABC_FF, 3);
diff --git a/dlls/kernelbase/locale.c b/dlls/kernelbase/locale.c
index ca2e6f25420..a2925c5203d 100644
--- a/dlls/kernelbase/locale.c
+++ b/dlls/kernelbase/locale.c
@@ -3022,7 +3022,8 @@ INT WINAPI CompareStringEx( const WCHAR *locale, DWORD flags, const WCHAR *str1,
 {
     DWORD supported_flags = NORM_IGNORECASE | NORM_IGNORENONSPACE | NORM_IGNORESYMBOLS | SORT_STRINGSORT |
                             NORM_IGNOREKANATYPE | NORM_IGNOREWIDTH | LOCALE_USE_CP_ACP;
-    DWORD semistub_flags = NORM_LINGUISTIC_CASING | LINGUISTIC_IGNORECASE | 0x10000000;
+    DWORD semistub_flags = NORM_LINGUISTIC_CASING | LINGUISTIC_IGNORECASE | LINGUISTIC_IGNOREDIACRITIC |
+                           SORT_DIGITSASNUMBERS | 0x10000000;
     /* 0x10000000 is related to diacritics in Arabic, Japanese, and Hebrew */
     INT ret;
     static int once;




More information about the wine-cvs mailing list