[php-src] Issue #8308: The return value of mb_list_encodings() doesn't contain 'SJIS-win'
| From: | alexdowad | Date: | Mon, 11 Apr 2022 09:01:32 +0000 |
| Subject: | [php-src] Issue #8308: The return value of mb_list_encodings() doesn't contain 'SJIS-win' | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-240841@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8308
Comment Author: alexdowad
@sj-i Thanks very much for this information. Just trying to process this...
The reply from Moriyama-san which you kindly linked to mentions SJIS → CP932, EUC-JP → CP932,
and ISO-2022-JP → CP932 conversions. The implication is that in all 3 of the source encodings,
_something_ maps to U+203E. Then, since conversions from one legacy encoding to another go through
Unicode, when converting Unicode → CP932, we convert U+203E to 0x7E so that the _something_
mentioned above will map to CP932 0x7E.
At least in mbstring, SJIS 0x7E maps to U+203E. So mapping U+203E to CP932 0x7E means that SJIS 0x7E
will convert to CP932 0x7E.
However, in both mbstring and iconv, EUC-JP 0x7E and ISO-2022-JP 0x7E do not map to U+203E. So I am
still trying to figure out why Moriyama-san said this mapping is related to EUC-JP → CP932 and
ISO-2022-JP → CP932 conversions...