[php-src] Issue #8308: The return value of mb_list_encodings() doesn't contain 'SJIS-win'
| From: | alexdowad | Date: | Wed, 06 Apr 2022 21:04:04 +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-240716@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8308
Comment Author: alexdowad
_(Commenting further on the sample code which @sj-i shared:)_ Hmm. This actually seems to be closely
related to the same issue which you have commented on in #8281. (Whether SJIS 0x7E should be
interpreted as U+007E or U+203E...)
It does appear that the legacy behavior of
CP932 in mbstring was a bit
illogical, in that when converting Unicode → CP932, it would convert U+007E to 0x7E (implying that
0x7E is being used to represent a tilde, not an overbar), but then when converting CP932 →
Unicode, it would convert U+203E to 0x7E (implying that 0x7E represents an overbar, not a tilde).
Do you have any idea why this is the case?
> SJIS-win and CP932 are both used in Japan. Some articles recommend one, others recommend
> another. It is optimistic to say that keeping only one behavior is enough. Both could be depended on
> by a fair number of users.
If these encodings are different, and both are used by even a small number of users, then we
definitely need to support both of them. That is not under question. Currently I am still trying to
understand clearly what the difference is.