-
Notifications
You must be signed in to change notification settings - Fork 458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
intl402/Locale/prototype/minimize/removing-likely-subtags-first-adds-likely-subtags.js doesn't match web reality & LDML spec #2628
Comments
See #2598, the linked ICU issues in the test case, and https://unicode-org.atlassian.net/browse/CLDR-13749. |
ah thanks for the context @anba . In that case, everything checks out except for
|
Hmm, this may need to be clarified on the CLDR side. From http://unicode.org/reports/tr35/#Likely_Subtags:
From supplemental/likelySubtags.xml: <likelySubtag from="und_150" to="ru_Cyrl_RU"/> The quoted text from UTS 35 doesn't seem to be true when the base language subtag is Based on the results I see for ICU, maybe ICU evaluates this following step:
where empty is defined as:
as if the empty was defined as:
|
cc @FrankYFTang |
Yeah that's the confusing part where I'm also not quite sure if the typo explains it. |
OK so the spec text isn't really correct IMO, tracing thru ICU4J (since I don't know C): https://github.com/unicode-org/icu/blob/4231ca5be053a22a1be24eb891817458c97db709/icu4j/main/classes/core/src/com/ibm/icu/util/ULocale.java#L2877-L2899 looks like maximize takes in if (likelySubtags != null) {
// Always use the language tag from the
// maximal string, since it may be more
// specific than the one provided.
return createTagString(
null,
script,
null,
variants,
likelySubtags);
} So either it's an impl issue, or spec issue |
@longlho is there any further action to take in Test262? |
I'll put in a jira for Unicode, or maybe @sffc can clarify? |
The language tag canonicalization algorithm in UTS 35 is currently in flux, with an attempt to make it more clear and cover more of these edge cases. |
Specifically
We caught this while working on our Intl.Locale polyfill. Checked on Chrome and that seems to agree.
The text was updated successfully, but these errors were encountered: