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