From 1f799dd84d0991762fdaebfb3e22b589419da475 Mon Sep 17 00:00:00 2001 From: zhangweiwu Date: Sat, 29 May 2004 01:14:29 +0000 Subject: [PATCH] patch [ 962307 ] Chinese charset conversion patch "I am alost certain this is the best solution. I just commited the change, please close this patch. This is a typical problem (GB2312~GB18030) that many opensource/commercial mailers fail to handle." --- phpgwapi/inc/class.translation_sql.inc.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/phpgwapi/inc/class.translation_sql.inc.php b/phpgwapi/inc/class.translation_sql.inc.php index 28c81b4cfb..9e125e10b4 100644 --- a/phpgwapi/inc/class.translation_sql.inc.php +++ b/phpgwapi/inc/class.translation_sql.inc.php @@ -322,6 +322,12 @@ } if(function_exists('iconv')) { + if($from=='EUC-CN') $from='gb18030'; + // the above is to workaround patch #962307 + // if using EUC-CN, for iconv it strickly follow GB2312 and fail + // in an email on the first Traditional/Japanese/Korean character, + // but in reality when people send mails in GB2312, UMA mostly use + // extended GB13000/GB18030 which allow T/Jap/Korean characters. if (($data = iconv($from,$to,$data))) { return $data;