History log of /PHP-8.1/ext/intl/tests/locale/bug72809.phpt (Results 1 – 1 of 1)
Revision Date Author Comments
# 0f1b17e3 14-Jun-2021 Christoph M. Becker

Fix #72809: Locale::lookup() wrong result with canonicalize option

Canonicalization converts the locale to ICU format[1]. However, the
lookup described in RFC 4647, section 3.4, is abou

Fix #72809: Locale::lookup() wrong result with canonicalize option

Canonicalization converts the locale to ICU format[1]. However, the
lookup described in RFC 4647, section 3.4, is about POSIX format. To
make that lookup work for ICU format, we also need to cater to keyword
separators.

The results are somewhat unexpected, but apparently canonical lookup is
explicitly supposed to return canonical language tags[2].

[1] <https://unicode-org.github.io/icu/userguide/locale/#canonicalization>
[2] <https://github.com/php/php-src/blob/php-7.4.20/ext/intl/locale/locale_methods.c#L1504>

Closes GH-7151.

show more ...