xref: /PHP-7.2/ext/iconv/tests/bug66828.phpt (revision 9cbe1283)
1--TEST--
2Bug #66828 (iconv_mime_encode Q-encoding longer than it should be)
3--SKIPIF--
4<?php
5if (!extension_loaded('iconv')) die('skip iconv extension not available');
6?>
7--FILE--
8<?php
9$preferences = array(
10    "input-charset" => "ISO-8859-1",
11    "output-charset" => "UTF-8",
12    "line-length" => 76,
13    "line-break-chars" => "\n",
14    "scheme" => "Q"
15);
16var_dump(iconv_mime_encode("Subject", "Test Test Test Test Test Test Test Test", $preferences));
17?>
18===DONE===
19--EXPECT--
20string(74) "Subject: =?UTF-8?Q?Test=20Test=20Test=20Test=20Test=20Test=20Test=20Test?="
21===DONE===
22