* @return string $string decoded string
*/
function charset_decode_big5 ($string) {
- global $default_charset;
+ global $default_charset,$agresive_decoding;
- if (strtolower($default_charset) == 'big5')
- return $string;
+ if (!$agresive_decoding) return $string;
/* Only do the slow convert if there are 8-bit characters */
if (! ereg("[\200-\377]", $string))
* @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) )
* @return string Decoded string
*/
function charset_decode_utf_8 ($string) {
- global $default_charset;
+ global $default_charset,$squirrelmail_language;
- if (strtolower($default_charset) == 'utf-8')
+ if ($squirrelmail_language == 'ja_JP')
return $string;
/* Only do the slow convert if there are 8-bit characters */