Modified the test so it reflects the change to iconv_mime_decode()

This commit is contained in:
Moriyoshi Koizumi 2003-07-06 21:19:38 +00:00
parent 8d850b4c3a
commit 9fbd2f44ec

View File

@ -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)));