xref: /PHP-7.4/ext/iconv/tests/bug48289.phpt (revision 5c5fd74f)
1--TEST--
2Bug #48289 (iconv_mime_encode() quoted-printable scheme is broken)
3--SKIPIF--
4<?php extension_loaded('iconv') or die('skip iconv extension is not available'); ?>
5--FILE--
6<?php
7$text = "\xE3\x83\x86\xE3\x82\xB9\xE3\x83\x88\xE3\x83\x86\xE3\x82\xB9\xE3\x83\x88";
8$options = array(
9    'scheme' => 'Q',
10    'input-charset' => 'UTF-8',
11    'output-charset' => 'UTF-8',
12    'line-length' => 30,
13);
14
15echo iconv_mime_encode('Subject', $text, $options);
16--EXPECT--
17Subject: =?UTF-8?Q?=E3=83=86?=
18 =?UTF-8?Q?=E3=82=B9?=
19 =?UTF-8?Q?=E3=83=88?=
20 =?UTF-8?Q?=E3=83=86?=
21 =?UTF-8?Q?=E3=82=B9?=
22 =?UTF-8?Q?=E3=83=88?=
23