From b3dfa3d3869f9cf91d4fdd50843baabe80a5d5f8 Mon Sep 17 00:00:00 2001 From: Lars Kneschke Date: Tue, 7 Oct 2003 20:56:33 +0000 Subject: [PATCH] little fix for gb2312 --- phpgwapi/inc/class.translation_sql.inc.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/phpgwapi/inc/class.translation_sql.inc.php b/phpgwapi/inc/class.translation_sql.inc.php index 0e077ed44b..79c8404be8 100644 --- a/phpgwapi/inc/class.translation_sql.inc.php +++ b/phpgwapi/inc/class.translation_sql.inc.php @@ -245,6 +245,13 @@ if ($from == 'ascii') $from = 'iso-8859-1'; //echo "

autodetected charset of '$data' = '$from'

\n"; } + /* php does not seem to support gb2312 + but seems to be able to decode it as another charset + */ + if(strtolower($from) == 'gb2312') + { + $from = mb_detect_encoding($data); + } if (!$to) { $to = $this->charset();