Skip to content

Commit

Permalink
Do not allow duplicate variants within the tlang component of a trans…
Browse files Browse the repository at this point in the history
…formed content extension.
  • Loading branch information
jswalden committed Apr 24, 2020
1 parent 12c92db commit f8d58ac
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions spec/locales-currencies-tz.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,33 @@ <h1>Unicode Locale Extension Sequences</h1>
<h1>IsStructurallyValidLanguageTag ( _locale_ )</h1>

<p>
The IsStructurallyValidLanguageTag abstract operation verifies that the _locale_ argument (which must be a String value)
The IsStructurallyValidLanguageTag abstract operation verifies that the _locale_ argument (which must be a String value) represents a well-formed "Unicode BCP 47 locale identifier", consistent with <a href="https://unicode.org/reports/tr35/#Unicode_locale_identifier">Unicode Technical Standard 35 section 3.2</a>.
</p>

<p>
IsStructurallyValidLanguageTag returns *true* if all of the following conditions hold, *false* otherwise:
</p>

<ul>
<li>represents a well-formed "Unicode BCP 47 locale identifier" as specified in <a href="https://unicode.org/reports/tr35/#Unicode_locale_identifier">Unicode Technical Standard 35 section 3.2</a>,</li>
<li>does not include duplicate variant subtags, and</li>
<li>does not include duplicate singleton subtags.</li>
<li>_locale_ can be generated from the EBNF grammar in section 3.2 of the Unicode Technical Standard 35, starting with `unicode_locale_id`;</li>
<li>_locale_ does not use any of the backwards compatiblity syntax described in <a href="https://unicode.org/reports/tr35/#BCP_47_Conformance">Unicode Technical Standard #35 LDML § 3.3 BCP 47 Conformance</a>; and</li>
<li>interpreting _locale_ as `unicode_locale_id`,
<ul>
<li>the `unicode_language_id` within _locale_ does not contain ASCII case-insensitively equivalent `unicode_variant_subtag` subtags, and</li>
<li>if _locale_ contains an `extensions*` component, that component
<ul>
<li>contains at most one `unicode_locale_extensions` component,</li>
<li>contains at most one `transformed_extensions` component,</li>
<li>does not contain multiple `other_extensions` components with ASCII case-insensitively equivalent `[alphanum-[tTuUxX]]` subtags, and</li>
<li>if a `transformed_extensions` component is present and contains a `tlang` component, then the `(sep unicode_variant_subtag)*` within the `tlang` component does not contain ASCII case-insensitively equivalent `unicode_variant_subtag` subtags.
</ul>
</li>
</ul>
</li>
</ul>

<p>
The abstract operation returns true if _locale_ can be generated from the EBNF grammar in section 3.2 of the Unicode Technical Standard 35, starting with `unicode_locale_id`, and does not contain duplicate variant or singleton subtags (other than as a private use subtag). It returns false otherwise. Terminal value characters in the grammar are interpreted as the Unicode equivalents of the ASCII octet values given.
When evaluating each condition, terminal value characters in the grammar are interpreted as the corresponding ASCII code points.
</p>
</emu-clause>

Expand Down

0 comments on commit f8d58ac

Please sign in to comment.