ICU4C: Locale canonicalization should take Preferred-Value into consideration

Description

When using uloc_toLanguageTag/fromLanguageTag de-DD stays de-DD, instead of becoming de-DE.

RFC 5646 section 4.5, and step 3 of that section says "Subtags are replaced by their 'Preferred-Value', if there is one." The entry for region DD in the IANA Language Subtag Registry has Preferred-Value DE.

http://tools.ietf.org/html/rfc5646#section-4.5
http://www.iana.org/assignments/language-subtag-registry/

Activity

Show:

Jungshik Shin September 28, 2018 at 4:58 AM

ICU4C is done. For ICU4J, will file a new bug because 63.1 cut-off was missed.

Jungshik Shin September 11, 2018 at 7:59 AM

Thanks. I'll make a PR.

Fredrik Roubert September 11, 2018 at 7:50 AM

Please do.

Jungshik Shin September 11, 2018 at 7:47 AM

Fredrik, can I take this one?

I filed a series of bugs (listed in an earlier comment) but I guess all of them can be consolidated into this one.

Chromium has a local patch ( https://cs.chromium.org/chromium/src/third_party/icu/patches/locid_map.patch?g=0 ), but I want to upstream the patch before 63.

UnicodeBot June 30, 2018 at 11:53 PM

Trac Comment 23 by —2018-04-25T22:31:38.587Z

was duped to this one.

Fixed

Details

Assignee

Reporter

Components

Priority

Time Needed

Days

Fix versions

Created June 28, 2018 at 5:19 PM
Updated October 22, 2018 at 9:53 PM
Resolved September 28, 2018 at 4:58 AM