Mercurial > hg > rc1
comparison vendor/pear/mail_mime/tests/test_Bug_18083.phpt @ 0:1e000243b222
vanilla 1.3.3 distro, I hope
author | Charlie Root |
---|---|
date | Thu, 04 Jan 2018 15:50:29 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:1e000243b222 |
---|---|
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==?="; |