mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-03-10 13:08:21 +01:00
"prefer iconv for windows-874 and tis-620 (Thai) charsets, as they are not supported by mbstring"
This commit is contained in:
parent
a6c0a043ba
commit
07b478fc9e
@ -535,6 +535,10 @@ class translation
|
||||
case 'windows-1257':
|
||||
$from = 'iso-8859-13';
|
||||
break;
|
||||
case 'windows-874':
|
||||
case 'tis-620':
|
||||
$prefer_iconv = true;
|
||||
break;
|
||||
}
|
||||
if (!$to)
|
||||
{
|
||||
@ -561,7 +565,7 @@ class translation
|
||||
{
|
||||
return utf8_decode($data);
|
||||
}
|
||||
if (self::$mbstring && ($data = @mb_convert_encoding($data,$to,$from)) != '')
|
||||
if (self::$mbstring && !$prefer_iconv && ($data = @mb_convert_encoding($data,$to,$from)) != '')
|
||||
{
|
||||
return $data;
|
||||
}
|
||||
@ -589,7 +593,7 @@ class translation
|
||||
// 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($from == 'EUC-CN')
|
||||
if($from == 'euc-cn')
|
||||
{
|
||||
$from = 'gb18030';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user