diff --git a/ext/iconv/tests/iconv_mime_encode.phpt b/ext/iconv/tests/iconv_mime_encode.phpt index 71d1946e448..f002ec75faf 100644 --- a/ext/iconv/tests/iconv_mime_encode.phpt +++ b/ext/iconv/tests/iconv_mime_encode.phpt @@ -11,9 +11,16 @@ function my_error_handler($errno, $errmsg, $filename, $linenum, $vars) echo "$errno: $errmsg\n"; } set_error_handler('my_error_handler'); +$preference = array( + "scheme" => "B", + "output-charset" => "ISO-2022-JP", + "input-charset" => "EUC-JP", + "line-break-chars" => "\n" +); for ($line_len= 0; $line_len < 80; ++$line_len) { print "-------- line length=$line_len\n"; - $result = iconv_mime_encode("From", "サンプル文字列サンプル文字列日本語テキスト", "B", "ISO-2022-JP", "EUC-JP", $line_len, "\n"); + $preference["line-length"] = $line_len; + $result = iconv_mime_encode("From", "サンプル文字列サンプル文字列日本語テキスト", $preference); var_dump($result); if ($result !== false) { list($max) = rsort(array_map("strlen", explode("\n", $result)));