Huw Davies : inetcomm: Charset name comparison should be case insensitive.

Alexandre Julliard julliard at winehq.org
Mon Sep 22 07:04:57 CDT 2008


Module: wine
Branch: master
Commit: ed8b219c6853e04d315e4e3e7efcad94bb36abe7
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ed8b219c6853e04d315e4e3e7efcad94bb36abe7

Author: Huw Davies <huw at codeweavers.com>
Date:   Mon Sep 22 10:50:06 2008 +0100

inetcomm: Charset name comparison should be case insensitive.

---

 dlls/inetcomm/mimeintl.c       |    2 +-
 dlls/inetcomm/tests/mimeintl.c |    3 +++
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/dlls/inetcomm/mimeintl.c b/dlls/inetcomm/mimeintl.c
index 262bdc5..0029af8 100644
--- a/dlls/inetcomm/mimeintl.c
+++ b/dlls/inetcomm/mimeintl.c
@@ -250,7 +250,7 @@ static HRESULT WINAPI MimeInternat_FindCharset(IMimeInternational *iface, LPCSTR
 
     LIST_FOR_EACH_ENTRY(charset, &This->charsets, charset_entry, entry)
     {
-        if(!strcmp(charset->cs_info.szName, pszCharset))
+        if(!lstrcmpiA(charset->cs_info.szName, pszCharset))
         {
             *phCharset = charset->cs_info.hCharset;
             hr = S_OK;
diff --git a/dlls/inetcomm/tests/mimeintl.c b/dlls/inetcomm/tests/mimeintl.c
index e7cdd87..d82c191 100644
--- a/dlls/inetcomm/tests/mimeintl.c
+++ b/dlls/inetcomm/tests/mimeintl.c
@@ -149,6 +149,9 @@ static void test_charset(void)
     hr = IMimeInternational_FindCharset(internat, "windows-1252", &hcs);
     ok(hr == S_OK, "got %08x\n", hr);
     ok(hcs_windows_1252 == hcs, "got different hcharsets for the same name\n");
+    hr = IMimeInternational_FindCharset(internat, "WiNdoWs-1252", &hcs);
+    ok(hr == S_OK, "got %08x\n", hr);
+    ok(hcs_windows_1252 == hcs, "got different hcharsets for the same name\n");
 
     hr = IMimeInternational_FindCharset(internat, "windows-1251", &hcs_windows_1251);
     ok(hr == S_OK, "got %08x\n", hr);




More information about the wine-cvs mailing list