diff options
author | Alex Dowad <alexinbeijing@gmail.com> | 2020-10-18 14:56:32 +0200 |
---|---|---|
committer | Alex Dowad <alexinbeijing@gmail.com> | 2020-10-30 22:13:27 +0200 |
commit | b5ff87ca71375bbc5cb6eee93f15aff1cb756bb9 (patch) | |
tree | 18ba2a00acf5c2995c5cc08b09d2de95794f6088 /build/php.m4 | |
parent | 2ce15d9c8d073793268f879dda1f9f6b1ef7854f (diff) | |
download | php-git-b5ff87ca71375bbc5cb6eee93f15aff1cb756bb9.tar.gz |
Fix mbstring support for CP1252 encoding
It's a bit surprising how much was broken here.
- Identify filter was utterly and completely wrong.
- Instead of handling invalid CP1252 bytes as specified by
`mb_substitute_character`, it would convert them to Unicode 0xFFFD
(generic replacement character).
- When converting ISO-8859-1 to CP1252, invalid ISO-8859-1 bytes would
be passed through silently.
- Unicode codepoints from 0x80-0x9F were converted to CP1252 bytes 0x80-0x9F,
which is wrong.
- Unicode codepoint 0xFFFD was converted to CP1252 0x9F, which is very wrong.
Also clean up some unneeded code, and make the conversion table consistent with
others by using zero as a 'invalid' marker, rather than 0xFFFD.
Diffstat (limited to 'build/php.m4')
0 files changed, 0 insertions, 0 deletions