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

Commit

Permalink
Remove the call to CanonicalizeLanguageTag in InsertUnicodeExtension
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
anba committed Sep 24, 2018
1 parent ce7e711 commit 5bf56ba
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,7 @@ <h1>InsertUnicodeExtension( _locale_, _extension_ )</h1>
1. Let _preExtension_ be the substring of _locale_ from position 0, inclusive, to position _privateIndex_, exclusive.
1. Let _postExtension_ be the substring of _locale_ from position _privateIndex_ to the end of the string.
1. Let _locale_ be the string-concatenation of _preExtension_, _extension_, and _postExtension_.
1. Assert: IsStructurallyValidLanguageTag(_locale_) is *true*.
1. Return ! CanonicalizeLanguageTag(_locale_).
1. Return _locale_.
</emu-alg>
</emu-clause>

Expand Down

0 comments on commit 5bf56ba

Please sign in to comment.