Merge branch 'master' of github.com:roundcube/roundcubemail

pull/5690/head
Aleksander Machniak 8 years ago
commit 51dbc2e438

@ -201,7 +201,9 @@ class rcube_charset
}
// convert charset using iconv module
if ($iconv_options !== false && $from != 'UTF7-IMAP' && $to != 'UTF7-IMAP') {
if ($iconv_options !== false && $from != 'UTF7-IMAP' && $to != 'UTF7-IMAP'
&& $from !== 'ISO-2022-JP'
) {
// throw an exception if iconv reports an illegal character in input
// it means that input string has been truncated
set_error_handler(array('rcube_charset', 'error_handler'), E_NOTICE);
@ -227,6 +229,7 @@ class rcube_charset
$aliases = array(
'WINDOWS-1257' => 'ISO-8859-13',
'US-ASCII' => 'ASCII',
'ISO-2022-JP' => 'ISO-2022-JP-MS',
);
$mb_from = $aliases[$from] ?: $from;

@ -70,6 +70,7 @@ class Framework_Charset extends PHPUnit_Framework_TestCase
array('aż', 'a', 'UTF-8', 'US-ASCII'),
array('&BCAEMARBBEEESwQ7BDoEOA-', 'Рассылки', 'UTF7-IMAP', 'UTF-8'),
array('Рассылки', '&BCAEMARBBEEESwQ7BDoEOA-', 'UTF-8', 'UTF7-IMAP'),
array(base64_decode('GyRCLWo7M3l1OSk2SBsoQg=='), '㈱山﨑工業', 'ISO-2022-JP', 'UTF-8'),
);
}
@ -178,7 +179,7 @@ class Framework_Charset extends PHPUnit_Framework_TestCase
function data_detect_with_lang()
{
return array(
array('顯示名稱,主要', 'zh_TW', 'BIG-5'),
array(base64_decode('xeOl3KZXutkspUStbg=='), 'zh_TW', 'BIG-5'),
);
}

Loading…
Cancel
Save