--TEST-- Bug #21205 Handling ISO-2022-JP headers --SKIPIF-- '; $charset = 'ISO-2022-JP'; $encoding = 'base64'; foreach ($tests as $test) { $test = mb_convert_encoding($test, $charset, 'UTF-8'); print Mail_mimePart::encodeHeader("subject", $test, $charset, $encoding) . PHP_EOL; print Mail_mimePart::encodeHeader("to", $test.$addr, $charset, $encoding) . PHP_EOL; $test = '"' . $test . '"'; print Mail_mimePart::encodeHeader("subject", $test, $charset, $encoding) . PHP_EOL; print Mail_mimePart::encodeHeader("to", $test.$addr, $charset, $encoding) . PHP_EOL; } ?> --EXPECT-- =?ISO-2022-JP?B?GyRCIiI1fkVUSVwiIhsoQg==?= =?ISO-2022-JP?B?GyRCIiI1fkVUSVwiIhsoQg==?= =?ISO-2022-JP?B?GyRCIiI1fkVUSVwiIhsoQg==?= =?ISO-2022-JP?B?GyRCIiI1fkVUSVwiIhsoQg==?= =?ISO-2022-JP?B?GyRCIlwiXCJcIlwbKEI=?= =?ISO-2022-JP?B?GyRCIlwiXCJcIlwbKEI=?= =?ISO-2022-JP?B?GyRCIlwiXCJcIlwbKEI=?= =?ISO-2022-JP?B?GyRCIlwiXCJcIlwbKEI=?=