From 5bf56ba3b0c0c5d72a43bca1de2494d2e363c07a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bargull?= Date: Mon, 24 Sep 2018 09:19:44 -0400 Subject: [PATCH] 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. --- spec.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spec.html b/spec.html index 37353e4..a224e7d 100644 --- a/spec.html +++ b/spec.html @@ -173,8 +173,7 @@

InsertUnicodeExtension( _locale_, _extension_ )

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_.