1
0
mirror of https://github.com/php/php-src.git synced 2026-04-08 08:33:06 +02:00
Files
archived-php-src/ext
Alex Dowad 0ce755be26 Implement mb_encode_mimeheader using fast text conversion filters
The behavior of the new mb_encode_mimeheader implementation closely
follows the old implementation, except for three points:

• The old implementation was missing a call to the mbfl_convert_filter
  flush function. So it would sometimes truncate the input string just
  before its end.

• The old implementation would drop zero bytes when QPrint-encoding.
  So for example, if you tried to QPrint-encode the UTF-32BE string
  "\x00\x00\x12\x34", its QPrint-encoding would be "=12=34", which
  does not decode to a valid UTF-32BE string. This is now fixed.

• In some rare corner cases, the new implementation will choose to
  Base64-encode or QPrint-encode the input string, where the old
  implementation would have just added newlines to it. Specifically,
  this can happen when there is a non-space ASCII character, followed
  by a large number of ASCII spaces, followed by a non-ASCII character.

The new implementation is around 2.5-8x faster than the old one,
depending on the text encoding and transfer encoding used. Performance
gains are greater with Base64 transfer encoding than with QPrint
transfer encoding; this is not because QPrint-encoding bytes is slow,
but because QPrint-encoded output is much bigger than Base64-encoded
output and takes more lines, so we have to go through the process of
finding the right place to break a line many more times.
2023-03-15 15:53:08 +02:00
..
2022-10-27 14:42:17 +01:00
2023-02-24 14:33:47 +00:00
2023-03-14 17:52:19 +01:00
2023-03-06 17:03:41 +00:00
2022-09-07 17:41:10 +02:00
2022-10-27 14:42:40 +01:00
2023-03-03 21:12:27 +00:00
2023-02-25 14:36:56 +00:00
2023-02-17 16:40:14 +00:00
2022-09-06 10:42:34 +01:00
2023-03-13 20:12:37 +01:00
2023-03-05 22:16:23 +01:00
2023-03-03 11:56:34 +01:00
2022-11-30 12:13:36 +01:00
2022-10-19 11:37:30 +02:00
2023-01-16 12:27:33 +01:00
2023-03-01 13:25:34 +01:00
2023-03-05 22:16:23 +01:00
2023-03-06 17:34:24 +01:00
2023-03-15 09:06:29 +01:00
2023-01-16 12:27:33 +01:00
2022-09-07 17:41:10 +02:00
2023-03-10 14:24:54 +00:00
2023-03-15 01:40:06 +01:00
2023-03-01 23:05:24 +01:00
2023-02-21 14:32:52 +00:00
2023-02-26 14:34:39 +00:00
2023-02-12 21:34:14 -07:00
2023-03-13 12:39:40 +01:00