php-src/ext/intl
Christoph M. Becker 0f1b17e378
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.
2021-06-16 10:33:59 +02:00
..
breakiterator Replace ZVAL_COPY() and ZVAL_COPY_VALUE() for IS_OBJECT by cheaper macros 2019-05-28 20:10:02 +03:00
calendar Apply tidy formatting 2020-02-03 13:41:31 +01:00
collator Replace ZVAL_COPY() and ZVAL_COPY_VALUE() for IS_OBJECT by cheaper macros 2019-05-28 20:10:02 +03:00
common Fix #80763: msgfmt_format() does not accept DateTime references 2021-02-17 17:26:48 +01:00
converter Use type-checked ref assignment in UConverter 2020-02-28 10:21:50 +01:00
dateformat Allow exceptions in __toString() 2019-06-05 14:25:07 +02:00
formatter Merge branch 'PHP-7.3' into PHP-7.4 2020-02-03 12:29:43 +01:00
grapheme Remove local variables 2019-02-03 21:03:00 +01:00
idn Merge branch 'PHP-7.3' into PHP-7.4 2019-09-10 16:29:44 +02:00
locale Fix #72809: Locale::lookup() wrong result with canonicalize option 2021-06-16 10:33:59 +02:00
msgformat Fixed bug #80425 2020-11-27 10:02:00 +01:00
normalizer Remove local variables 2019-02-03 21:03:00 +01:00
resourcebundle SimpleXMLElement and ResourceBundle implement Countable 2019-05-31 18:59:19 +02:00
spoofchecker Remove local variables 2019-02-03 21:03:00 +01:00
tests Fix #72809: Locale::lookup() wrong result with canonicalize option 2021-06-16 10:33:59 +02:00
timezone Convert all php_error_docref0 to php_error_docref 2019-07-13 02:05:17 +02:00
transliterator Convert all php_error_docref0 to php_error_docref 2019-07-13 02:05:17 +02:00
uchar Sync leading and final newlines in source code files 2018-10-14 12:56:38 +02:00
config.m4 Normalize comments in *nix build system m4 files 2019-05-12 18:43:03 +02:00
config.w32 Trim trailing whitespace in source code files 2018-10-13 14:17:28 +02:00
CREDITS
ERROR_CONVENTIONS.md Fix miscellaneous typos in docs 2019-10-19 19:19:28 +02:00
intl_common.h
intl_convert.c Remove local variables 2019-02-03 21:03:00 +01:00
intl_convert.h
intl_convertcpp.cpp Remove unused Git attributes ident 2018-07-25 00:53:25 +02:00
intl_convertcpp.h Remove unused Git attributes ident 2018-07-25 00:53:25 +02:00
intl_cppshims.h
intl_data.h Fixed bug #74385 Locale::parseLocale() broken with some arguments 2018-05-03 16:34:33 +02:00
intl_error.c Remove local variables 2019-02-03 21:03:00 +01:00
intl_error.h Reduce struct size by 8 bytes on 64-bit 2018-02-19 10:12:46 +01:00
php_intl.c Remove local variables 2019-02-03 21:03:00 +01:00
php_intl.h Remove local variables 2019-02-03 21:03:00 +01:00