0
|
1 --TEST--
|
|
2 Bug #3513 Support of RFC2231 in header fields. (ISO-2022-JP)
|
|
3 --SKIPIF--
|
|
4 --FILE--
|
|
5 <?php
|
|
6 mb_internal_encoding('ISO-2022-JP');
|
|
7 $testEncoded="GyRCRnxLXDhsGyhCLnR4dA==";
|
|
8 $test = base64_decode($testEncoded); // Japanese filename in ISO-2022-JP charset.
|
|
9 require_once('Mail/mime.php');
|
|
10
|
|
11 $Mime = new Mail_Mime();
|
|
12 $Mime->addAttachment('testfile',"text/plain", $test, FALSE, 'base64', 'attachment', 'iso-2022-jp', '');
|
|
13
|
|
14 $content = $Mime->get();
|
|
15 $content = str_replace("\n", '', $content);
|
|
16
|
|
17 if (preg_match('/filename([^\s]+)/i', $content, $matches)) {
|
|
18 echo $matches[1];
|
|
19 }
|
|
20 ?>
|
|
21 --EXPECT--
|
|
22 *=iso-2022-jp''%1B$BF|K%5C8l%1B%28B.txt;
|
|
23
|