xref: /PHP-8.2/ext/iconv/tests/bug48289.phpt (revision e9f783fc)
1--TEST--
2Bug #48289 (iconv_mime_encode() quoted-printable scheme is broken)
3--EXTENSIONS--
4iconv
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?>
17--EXPECT--
18Subject: =?UTF-8?Q?=E3=83=86?=
19 =?UTF-8?Q?=E3=82=B9?=
20 =?UTF-8?Q?=E3=83=88?=
21 =?UTF-8?Q?=E3=83=86?=
22 =?UTF-8?Q?=E3=82=B9?=
23 =?UTF-8?Q?=E3=83=88?=
24