Issue #2259 - process Unicode langtags and locale identifiers according to BCP 47

Major spec change: text references are to BCP47 (not the implementing RFCs) and
the single source of truth is now Unicode CLDR.

- Switch from IANA to CLDR for make_unicode
- Update grandfathered tag handling directly in the parser
- Don't support extlang, irregular, privateuse or 4-letter subtags
- Adjust comments to refer to Unicode BCP 47 locale identifiers, remove RFC 5646
- Canonicalize/order langtags correctly
- Tokenize BCP47 in reusable class

Based-on: m-c 1407674(partial), 1451082, 1530320, 1522070, 1531091
This commit is contained in:
Martok 2023-06-29 23:07:20 +02:00 committed by roytam1
commit 3ee2c9dcf1
12 changed files with 3331 additions and 1321 deletions

View file

@ -2545,8 +2545,6 @@ static const JSFunctionSpec intrinsic_functions[] = {
JS_FN("StringSplitStringLimit", intrinsic_StringSplitStringLimit, 3, 0),
// See builtin/RegExp.h for descriptions of the regexp_* functions.
JS_FN("regexp_exec_no_statics", regexp_exec_no_statics, 2,0),
JS_FN("regexp_test_no_statics", regexp_test_no_statics, 2,0),
JS_FN("regexp_construct_raw_flags", regexp_construct_raw_flags, 2,0),
JS_FN("regexp_clone", regexp_clone, 1,0),