1
0
mirror of https://github.com/php/php-src.git synced 2026-04-19 14:01:01 +02:00
Files
archived-php-src/ext/iconv/tests/bug53891.phpt
Christoph M. Becker 150e2b8c8c Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #66828: iconv_mime_encode Q-encoding longer than it should be
2018-09-22 15:56:49 +02:00

22 lines
541 B
PHP

--TEST--
Bug #53891 (iconv_mime_encode() fails to Q-encode UTF-8 string)
--SKIPIF--
<?php
if (!extension_loaded('iconv')) die('skip iconv extension not available');
?>
--FILE--
<?php
$preferences = array(
'scheme' => 'Q',
'input-charset' => 'utf-8',
'output-charset' => 'utf-8',
'line-length' => 74,
'line-break-chars' => "\r\n",
);
var_dump(iconv_mime_encode('subject', "d obeybiubrsfqllpdtpge…", $preferences));
?>
===DONE===
--EXPECT--
string(54) "subject: =?utf-8?Q?d=20obeybiubrsfqllpdtpge=E2=80=A6?="
===DONE===