From 3379969eccbecc4c856ec1845f663688ca82e855 Mon Sep 17 00:00:00 2001 From: tokul Date: Sun, 21 Dec 2003 14:58:19 +0000 Subject: [PATCH] managing agresive decoding and ja_JP + utf-8. global $default_charset will be used later by recode and iconv patches. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6304 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/decode/big5.php | 5 ++--- functions/decode/gb2312.php | 5 ++--- functions/decode/utf_8.php | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/functions/decode/big5.php b/functions/decode/big5.php index 6a00c39e..92c7ad24 100644 --- a/functions/decode/big5.php +++ b/functions/decode/big5.php @@ -44,10 +44,9 @@ * @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)) diff --git a/functions/decode/gb2312.php b/functions/decode/gb2312.php index 22e9f3df..5627b80d 100644 --- a/functions/decode/gb2312.php +++ b/functions/decode/gb2312.php @@ -44,10 +44,9 @@ * @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) ) diff --git a/functions/decode/utf_8.php b/functions/decode/utf_8.php index df87dcac..d76587f2 100644 --- a/functions/decode/utf_8.php +++ b/functions/decode/utf_8.php @@ -27,9 +27,9 @@ * @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 */ -- 2.25.1