[Unicode]   Common Locale Data Repository : Bug Tracking Home | Site Map | Search

CLDR Ticket #11397(closed: fixed)

Opened 7 months ago

Last modified 6 months ago

Make region code optional with subdivisions in the spec

Reported by: mark Owned by: mark
Component: other Data Locale:
Phase: spec-beta Review: pedberg
Weeks: Data Xpath:


There is currently a hard requirement for a region code matching the first 2 letters of the subdivision code.


That is needlessly strict, and introduces a dependency on likely subtags that should not be there.

It should be changed to be a recommendation.


A unicode_subdivision_id is only valid in a unicode_locale_id if it starts with the unicode_region_subtag in the unicode_language_id (after adding likely subtags, and comparing case-insensitively).

en-US-u-sd-usca is valid — the region "US" matches
en-CA-u-sd-gbsct is invalid — the region "gb" does not match "CA"
en-u-sd-gbsct is invalid — after adding likely subtags, this becomes en-Latn-US-u-sd-gbsct, where the region "gb" does not match "US"


It is strongly recommended that a unicode_locale_id contain a unicode_region_subtag if it contains a unicode_subdivision_id. That produces better behavior if the language tag is truncated or if the unicode_subdivision_id is ignored by an implementation.

If a unicode_subdivision_id contains both a unicode_region_subtag and a unicode_subdivision_id, it is only valid if the unicode_subdivision_id starts with the unicode_region_subtag (case-insensitively).

en-US-u-sd-usca is valid — the region "US" matches the first part of "usca"
en-CA-u-sd-gbsct is invalid — the region "CA" doesn't not match the first part of "gbsct". An implementation should either return an error or disregard the subdivision id.
en-u-sd-gbsct is valid but not recommended — an implementation that ignores the unicode_subdivision_id could add likely subtags and get the invalid en-Latn-US-u-sd-gbsct.


Change History

comment:1 Changed 7 months ago by mark

  • Phase changed from dsub to spec-beta
  • Priority changed from assess to major
  • type changed from unknown to spec
  • Component changed from unknown to other
  • Milestone changed from UNSCH to 34

comment:2 Changed 6 months ago by mark

  • Owner changed from anybody to mark
  • Status changed from new to reviewing
  • Review set to pedberg

comment:3 Changed 6 months ago by pedberg

  • Status changed from reviewing to reviewfeedback

There are no commits on this. Were the changes committed under some other ticket number?

comment:4 Changed 6 months ago by mark

  • Status changed from reviewfeedback to reviewing

Sorry, yes, they were on a another ticket. Can you look at the text of http://unicode.org/repos/cldr/trunk/specs/ldml/tr35.html#Validity to verify?

comment:5 Changed 6 months ago by pedberg

  • Status changed from reviewing to closed
  • Resolution set to fixed

OK, thanks, that looks good.

Last edited 6 months ago by pedberg (previous) (diff)

Add a comment

Modify Ticket

as closed
Next status will be 'new'
Next status will be 'closed'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.