From eafe25143b65ea61c0a71b9a340d237a0b760ea6 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Sat, 17 Jan 2026 20:34:44 +0900 Subject: [PATCH] [SHELL32] FileTypesDlg: Use StrCmpIW instead of wcsicmp (#8604) wcsicmp depends on CRT locale status. We have to respect thread locale. JIRA issue: CORE-20442 - Use shlwapi!StrCmpIW instead of wcsicmp in FileTypesDlg_CompareItems function. --- dll/win32/shell32/dialogs/filetypes.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dll/win32/shell32/dialogs/filetypes.cpp b/dll/win32/shell32/dialogs/filetypes.cpp index 851e7fa2f72..954ac8e2e2b 100644 --- a/dll/win32/shell32/dialogs/filetypes.cpp +++ b/dll/win32/shell32/dialogs/filetypes.cpp @@ -1652,9 +1652,9 @@ FileTypesDlg_CompareItems(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort) PFILE_TYPE_ENTRY entry1 = (PFILE_TYPE_ENTRY)lParam1, entry2 = (PFILE_TYPE_ENTRY)lParam2; int x = 0; if (pG->SortCol == 1) - x = wcsicmp(GetTypeName(entry1, pG), GetTypeName(entry2, pG)); + x = StrCmpIW(GetTypeName(entry1, pG), GetTypeName(entry2, pG)); if (!x && !(x = entry1->IsExtension() - entry2->IsExtension())) - x = wcsicmp(entry1->FileExtension, entry2->FileExtension); + x = StrCmpIW(entry1->FileExtension, entry2->FileExtension); return x * pG->SortReverse; }