mirror of
https://github.com/php/php-src.git
synced 2024-12-02 06:13:40 +08:00
Modified the test so it reflects the change to iconv_mime_decode()
This commit is contained in:
parent
8d850b4c3a
commit
9fbd2f44ec
@ -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)));
|
||||
|
Loading…
Reference in New Issue
Block a user