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