Explorar o código

Charset spec test should be case-insensitive

alex-brainstorm %!s(int64=22) %!d(string=hai) anos
pai
achega
bbdd328082
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      functions/imap_utf7_local.php

+ 2 - 2
functions/imap_utf7_local.php

@@ -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;