[php-src] Issue #8308: The return value of mb_list_encodings() doesn't contain 'SJIS-win'
| From: | sj-i | Date: | Wed, 06 Apr 2022 20:24:40 +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-240714@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8308
Comment Author: sj-i
@alexdowad
> Was there actually some difference between SJIS-win and CP932
https://3v4l.org/AVllX
This code behaves differently between
SJIS-win and CP932 before 8.1.
> should there have been some difference?
As there has been some difference already 20+ years... there should be, unfortunately.
Yeah, I think I can hear the third sigh from you.
Legacy Japanese encodings should all be burned by fire and buried in the dark, though it's not
realistic.
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.
> mb_list_encodings should list the same legacy text encoding twice
Even if there is no difference, I would recommend keeping two names on the list to avoid BC breaks,
unless the maintenance burden is too high. When the maintenance burden is so much problematic,
changing it in a major release with deprecation beforehand is reasonable. If the behavior was
newborn or clearly disadvantageous to the user, I feel it could simply be fixed as a bug in a minor
release though...
> this is actually a change from PHP 7.4 to 8.0, not from 8.0 to 8.1
It's from PHP 8.1.
https://3v4l.org/glAfa