diff --git a/program/lib/Roundcube/rcube_charset.php b/program/lib/Roundcube/rcube_charset.php index 88eb6001f..5ef78b886 100644 --- a/program/lib/Roundcube/rcube_charset.php +++ b/program/lib/Roundcube/rcube_charset.php @@ -307,7 +307,7 @@ class rcube_charset // convert charset using iconv module if ($iconv_options !== false && $from != 'UTF7-IMAP' && $to != 'UTF7-IMAP' - && $from !== 'ISO-2022-JP' + && $from !== 'ISO-2022-JP' && $to !== 'ISO-2022-JP' ) { // throw an exception if iconv reports an illegal character in input // it means that input string has been truncated diff --git a/tests/Framework/Charset.php b/tests/Framework/Charset.php index f36b7b969..85cb4ba6c 100644 --- a/tests/Framework/Charset.php +++ b/tests/Framework/Charset.php @@ -71,6 +71,7 @@ class Framework_Charset extends PHPUnit_Framework_TestCase array('&BCAEMARBBEEESwQ7BDoEOA-', 'Рассылки', 'UTF7-IMAP', 'UTF-8'), array('Рассылки', '&BCAEMARBBEEESwQ7BDoEOA-', 'UTF-8', 'UTF7-IMAP'), array(base64_decode('GyRCLWo7M3l1OSk2SBsoQg=='), '㈱山﨑工業', 'ISO-2022-JP', 'UTF-8'), + array('㈱山﨑工業', base64_decode('GyRCLWo7M3l1OSk2SBsoQg=='), 'UTF-8', 'ISO-2022-JP'), ); }