Project

General

Profile

Bug #96179 » locale.php

Oliver Hader, 2021-12-01 14:19

 
<?php
function test(string $locale)
{
$actualLocale = setlocale(LC_CTYPE, $locale);
$string = 'https://whatever.org/简';
$parts = parse_url($string);
printf(
"'%s'@%- 12s: [%s]\n",
$parts['path'],
$actualLocale,
$parts['path'] === "/\xe7\xae\x80" ? 'ok' : 'fail'
);
}

test('zh_CN.UTF-8');
test('UTF-8');
test('C');
    (1-1/1)