Add a comment to wc_ascii_uasort_comparison explaining why setlocale is needed.
This commit is contained in:
parent
9d892f0678
commit
c9ea5922e2
|
@ -1771,6 +1771,8 @@ function wc_uasort_comparison( $a, $b ) {
|
|||
* @return int
|
||||
*/
|
||||
function wc_ascii_uasort_comparison( $a, $b ) {
|
||||
// 'setlocale' is required for compatibility with PHP 8.
|
||||
// Without it, 'iconv' will return '?'s instead of transliterated characters.
|
||||
$prev_locale = setlocale( LC_CTYPE, 0 );
|
||||
setlocale( LC_ALL, 'C.UTF-8' );
|
||||
|
||||
|
|
Loading…
Reference in New Issue