xref: /PHP-8.4/ext/iconv/tests/bug53891.phpt (revision e9f783fc)
1--TEST--
2Bug #53891 (iconv_mime_encode() fails to Q-encode UTF-8 string)
3--EXTENSIONS--
4iconv
5--FILE--
6<?php
7$preferences = array(
8    'scheme' => 'Q',
9    'input-charset'  => 'utf-8',
10    'output-charset' => 'utf-8',
11    'line-length' => 74,
12    'line-break-chars' => "\r\n",
13);
14var_dump(iconv_mime_encode('subject', "d obeybiubrsfqllpdtpge…", $preferences));
15?>
16--EXPECT--
17string(54) "subject: =?utf-8?Q?d=20obeybiubrsfqllpdtpge=E2=80=A6?="
18