Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Changes for InsertUnicodeExtension #62

Closed
wants to merge 3 commits into from

Commits on Sep 24, 2018

  1. Change an unreachable condition to an assertion

    InsertUnicodeExtension is never called when the language tag is a grandfathered or private-use only tag.
    anba committed Sep 24, 2018
    Configuration menu
    Copy the full SHA
    e9155f3 View commit details
    Browse the repository at this point in the history
  2. Use the attributes and keywords lists to decide if a Unicode extensio…

    …n is present
    
    This avoids an ambiguity how the Unicode BCP 47 U extension should be constructed when the attributes and the keywords lists are both empty.
    anba committed Sep 24, 2018
    Configuration menu
    Copy the full SHA
    ce7e711 View commit details
    Browse the repository at this point in the history
  3. Remove the call to CanonicalizeLanguageTag in InsertUnicodeExtension

    InsertUnicodeExtension only called CanonicalizeLanguageTag to maximize the shareable number of steps with 9.2.6 ResolveLocale, so that when the Intl.Locale proposal is merged into ECMA-402, ApplyUnicodeExtensionToTag and ResolveLocale can both call InsertUnicodeExtension to insert a Unicode extension into a language tag. And ResolveLocale only calls CanonicalizeLanguageTag so that implementations which implement the optional steps in 6.2.3 CanonicalizeLanguageTag, namely to apply canonicalization of the Unicode extension per RFC 6067, are allowed to use this extension canonicalization after adding the new Unicode extension in ResolveLocale.
    But now that Intl.Locale has made the RFC 6067 / UTR 35 canonicalization normative, it no longer makes sense to canonicalize the already canonicalized language tag with an also already canonicalized Unicode extension another time.
    anba committed Sep 24, 2018
    Configuration menu
    Copy the full SHA
    5bf56ba View commit details
    Browse the repository at this point in the history