Charset spec test should be case-insensitive
authoralex-brainstorm <alex-brainstorm@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 20 Jul 2003 22:43:15 +0000 (22:43 +0000)
committeralex-brainstorm <alex-brainstorm@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 20 Jul 2003 22:43:15 +0000 (22:43 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5359 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_utf7_local.php

index 261de0aa93abe7451d1ecff618cbaf993209a1fc..eb5db9c43b84e68266db0d48a8c906de5fc69be6 100644 (file)
@@ -39,7 +39,7 @@ function imap_utf7_encode_local($s) {
       return '';
 
     global $default_charset;
-    if ($default_charset != 'iso-8859-1') {
+    if (strtolower($default_charset) != 'iso-8859-1') {
       $utf7_s = sqimap_mb_convert_encoding($s, 'UTF7-IMAP', $default_charset, $default_charset);
       if ($utf7_s != '')
         return $utf7_s;
@@ -91,7 +91,7 @@ function imap_utf7_decode_local($s) {
       return '';
 
     global $default_charset;
-    if ($default_charset != 'iso-8859-1') {
+    if (strtolower($default_charset) != 'iso-8859-1') {
       $utf7_s = sqimap_mb_convert_encoding($s, $default_charset, 'UTF7-IMAP', $default_charset);
       if ($utf7_s != '')
         return $utf7_s;