[php-src] Issue #8308: The return value of mb_list_encodings() doesn't contain 'SJIS-win'
| From: | sj-i | Date: | Sat, 09 Apr 2022 18:40:45 +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-240818@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8308
Comment Author: sj-i
https://gist.github.com/sj-i/6bacf1bef255c096b3cbb78bfc29aa28
I have experimented with this already. So the case about U+00A5 is justified by the implementation
of Windows, via is 'best-fit' mapping.
References:
https://web.archive.org/web/20100212163537/http://blogs.msdn.com/michkap/archive/2004/12/14/284838.aspx#332622
> Now through the masgic of "best fit" mappings (which I will cover another day),
> U+2089 also maps to 0x5c on cp 932. Its a one-way mapping, obviously. But its there.
https://web.archive.org/web/20100212163537/http://blogs.msdn.com/michkap/archive/2004/12/14/284838.aspx#332622
> Look at http://microsoft.com/globaldev/reference/dbcs/932.htm
> which has the offical mapping for cp932. It only has the 0x4c to U+005c mapping, as the other (best
> fit) mapping is not documented; none of the best fit mappings are.
https://web.archive.org/web/20100130054656/http://blogs.msdn.com:80/michkap/archive/2005/09/17/469941.aspx
> both U+00a5 and U+20a9 have one-way 'best fit' mappings to 0x5c on their respective
> code pages.