forked from extern/egroupware
add fix for chinese language conversion
This commit is contained in:
parent
5e73b0dc6c
commit
c7daab6c2b
@ -258,15 +258,18 @@
|
||||
}
|
||||
/*
|
||||
php does not seem to support gb2312
|
||||
but seems to be able to decode it as another charset
|
||||
but seems to be able to decode it as EUC-CN
|
||||
*/
|
||||
if(strtolower($from) == 'gb2312')
|
||||
switch(strtolower($from))
|
||||
{
|
||||
$from = mb_detect_encoding($data);
|
||||
}
|
||||
if(strtolower($from) == 'us-ascii')
|
||||
{
|
||||
$from = 'iso-8859-1';
|
||||
case 'gb2312':
|
||||
case 'gb18030':
|
||||
$from = "EUC-CN";
|
||||
break;
|
||||
|
||||
case 'us-ascii':
|
||||
$from = 'iso-8859-1';
|
||||
break;
|
||||
}
|
||||
if (!$to)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user