managing agresive decoding and ja_JP + utf-8.
[squirrelmail.git] / functions / decode / gb2312.php
index 22e9f3df1478124d44458bfcb5e80af13d314d7f..5627b80ddf5d555e21a50d70376a86dd9f16a9a0 100644 (file)
  * @return string $string Decoded string
  */
 function charset_decode_gb2312 ($string) {
-    global $default_charset;
+    global $default_charset,$agresive_decoding;
 
-    if (strtolower($default_charset) == 'gb2312')
-        return $string;
+    if (!$agresive_decoding) return $string;
 
     /* Only do the slow convert if there are 8-bit characters */
     if ( ! ereg("[\241-\377]", $string) )