From ed8b219c6853e04d315e4e3e7efcad94bb36abe7 Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Mon, 22 Sep 2008 10:50:06 +0100 Subject: [PATCH] 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 deletion(-) diff --git a/dlls/inetcomm/mimeintl.c b/dlls/inetcomm/mimeintl.c index 262bdc5fdc..0029af8445 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 e7cdd87a28..d82c191fd1 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);