Closed
Description
Description
The following code:
<?php
var_dump(mb_list_encodings());
Resulted in this output:
- contains 'CP932' and 'SJIS', but no 'SJIS-win'
But I expected this output instead:
- contains 'SJIS-win'
As of PHP 8.1, SJIS-win is an alias of CP932, thus the return value of mb_list_encodings() doesn't contain 'SJIS-win'.
This breaks BC.
Some libraries have functions which receive one or more encoding names as arguments, and they often validate the input by the return value of mb_list_encodings().
This should be reverted, or fixed, or at least documented as an incompatible change.
PHP Version
PHP 8.1.0
Operating System
No response