com php-src: Fix mbstring support for EUC-JP text encoding: ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c ext/mbst ring/tests/data/EUC-JP.txt
ext/mbstring/tests/eucjp_encod ing.phpt
| From: | Alex Dowad | Date: | Mon, 09 Nov 2020 11:45:17 +0000 |
| Subject: | com php-src: Fix mbstring support for EUC-JP text encoding: ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c ext/mbst ring/tests/data/EUC-JP.txt ext/mbstring/tests/eucjp_encod ing.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-114088@lists.php.net to get a copy of this message | ||
Commit: 8f6889b20d43ed99564c380b879264dca6c541fb
Author: Alex Dowad <alexinbeijing@gmail.com> Thu, 1 Oct 2020 19:56:42 +0200
Parents: ad7e0f16ccee09a28b4cb78055937f513aef9e61
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8f6889b20d43ed99564c380b879264dca6c541fb
Log:
Fix mbstring support for EUC-JP text encoding
- Don't allow control characters to appear in the middle of a multi-byte
character. (A strange feature, or perhaps misfeature, of mbstring which is
not present in other libraries such as iconv.)
- When checking whether string is valid, reject kuten codes which do not
map to any character, whether converting from EUC-JP to another encoding,
or converting another encoding which uses JIS X 0208/0212 charsets to
EUC-JP.
- Truncated multi-byte characters are treated as an error.
Changed paths:
M ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c
A ext/mbstring/tests/data/EUC-JP.txt
A ext/mbstring/tests/eucjp_encoding..phpt
Diff: <Diff exceeded maximum size>