0
|
1 --TEST--
|
|
2 Bug #12411 RFC2047 encoded attachment filenames
|
|
3 --SKIPIF--
|
|
4 --FILE--
|
|
5 <?php
|
|
6 include "Mail/mime.php";
|
|
7 $Mime = new Mail_mime();
|
|
8
|
|
9 // some text with polish Unicode letter at the beginning
|
|
10 $filename = base64_decode("xZtjaWVtYQ==");
|
|
11 $Mime->addAttachment('testfile', "text/plain", $filename, FALSE,
|
|
12 'base64', 'attachment', 'ISO-8859-1', 'pl', '',
|
|
13 'quoted-printable', 'base64');
|
|
14
|
|
15 $content = $Mime->get();
|
|
16 $content = str_replace("\n", '', $content);
|
|
17
|
|
18 if (preg_match_all('/(name|filename)=([^\s]+)/i', $content, $matches)) {
|
|
19 echo implode("\n", $matches[2]);
|
|
20 }
|
|
21
|
|
22 ?>
|
|
23 --EXPECT--
|
|
24 "=?ISO-8859-1?Q?=C5=9Bciema?="
|
|
25 "=?ISO-8859-1?B?xZtjaWVtYQ==?=";
|