1
0
mirror of https://github.com/php/php-src.git synced 2026-04-15 12:01:07 +02:00
Files
archived-php-src/ext
Christoph M. Becker eb03290754 Fix #53891: iconv_mime_encode() fails to Q-encode UTF-8 string
The minimum length of an encoded-word is actually the pure encoding
overhead plus the length of the `output-charset` plus the minimum unit
of encoded text, which is 4 for B-encoding and (for simplicity) 3 for
Q-encoding.  We also cater to the possibility that we need further
encoded words, which would be split by the `line-break-chars` followed
by a space character.  Obviously, the former `out_charset_len + 12` is
too simplistic and wrong in the given case (where the magic number
would be 13).

These simplifications are somewhat wasteful, but iconv_mime_encode()
with Q-encoding is wasteful anyway (see bug 66828[1]), and the proper
solution to convert the whole input to the desired output charset
upfront, and applying the encoding afterwards appears too much a change
for the stable releases.

[1] <https://bugs.php.net/66828>
2018-08-25 14:30:07 +02:00
..
2018-07-25 00:53:25 +02:00
2018-08-13 16:02:13 +02:00
2018-07-25 11:57:11 +02:00
2018-07-25 00:53:25 +02:00
2018-08-17 18:31:58 +02:00
2018-08-06 14:28:32 +02:00
2018-07-25 11:57:11 +02:00
2018-07-25 00:53:25 +02:00
2018-08-02 18:28:56 +02:00
2018-07-25 00:53:25 +02:00
2018-08-09 22:09:21 +02:00
2018-08-13 09:18:38 +02:00
2018-08-05 00:01:35 +02:00
2018-07-27 16:27:41 +02:00
2018-08-13 09:18:38 +02:00
2018-07-31 03:09:44 +02:00
2018-07-30 18:29:40 +02:00
2018-08-13 09:18:38 +02:00
2018-07-25 00:53:25 +02:00
2018-08-02 18:28:56 +02:00
2018-07-25 00:53:25 +02:00
2018-08-22 15:40:03 +02:00
2018-07-26 14:23:40 +02:00
2018-08-13 16:09:32 +02:00
2018-07-25 00:53:25 +02:00
2018-08-06 09:39:52 +02:00
2018-07-29 13:48:35 -03:00