| 1 |
lars |
1 |
--TEST--
|
|
|
2 |
Bug #12411 RFC2047 encoded attachment filenames
|
|
|
3 |
--SKIPIF--
|
|
|
4 |
--FILE--
|
|
|
5 |
<?php
|
|
|
6 |
error_reporting(E_ALL); // ignore E_STRICT
|
|
|
7 |
include "Mail/mime.php";
|
|
|
8 |
$m = new Mail_mime();
|
|
|
9 |
|
|
|
10 |
// some text with polish Unicode letter at the beginning
|
|
|
11 |
$path = "/path/";
|
|
|
12 |
$filename = $path . base64_decode("xZtjaWVtYQ==");
|
|
|
13 |
$m->addAttachment('testfile', "text/plain", $filename, FALSE,
|
|
|
14 |
'base64', 'attachment', 'ISO-8859-1', 'pl', '',
|
|
|
15 |
'quoted-printable', 'base64');
|
|
|
16 |
|
|
|
17 |
$root = $m->_addMixedPart();
|
|
|
18 |
$enc = $m->_addAttachmentPart($root, $m->_parts[0]);
|
|
|
19 |
|
|
|
20 |
echo $enc->_headers['Content-Type'];
|
|
|
21 |
echo "\n";
|
|
|
22 |
echo $enc->_headers['Content-Disposition'];
|
|
|
23 |
?>
|
|
|
24 |
--EXPECT--
|
|
|
25 |
text/plain; charset=ISO-8859-1;
|
|
|
26 |
name="=?ISO-8859-1?Q?=C5=9Bciema?="
|
|
|
27 |
attachment;
|
|
|
28 |
filename="=?ISO-8859-1?B?xZtjaWVtYQ==?="
|