Browse Source

preg_match('/iso-8859-/'.. covered all iso-8859 charsets (iso-8859-1,
iso-8859-2, iso-8859-13 etc). stristr does not do that.

tokul 22 years ago
parent
commit
0f6b3e7ff9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      functions/imap_utf7_local.php

+ 1 - 1
functions/imap_utf7_local.php

@@ -16,7 +16,7 @@ function sqimap_mb_convert_encoding($str, $to_encoding, $from_encoding, $default
   // Allows mbstring functions only with iso-8859-*, utf-8 and 
   // iso-2022-jp (Japanese)
   // koi8-r and gb2312 can be added only in php 4.3+
-  if ( stristr('iso-8859-',$default_charset) ||
+  if ( stristr('iso-8859-',substr($default_charset,0,9)) ||
        stristr('utf-8',$default_charset) || 
        stristr('iso-2022-jp',$default_charset) ) {
     if (function_exists('mb_convert_encoding')) {