drop support for long-obsolete locale ID variants: preeuro, pinyin, ...

Description

ICU locale canonicalization (and some other code) handles variants like EURO, PREEURO, and PINYIN that either we or someone else invented long ago, before we got script codes and "u" extensions added to BCP 47.

I suspect that no one uses EURO and PREEURO variants any more.

"pinyin" is a valid language subtag, but its registered meaning is "Pinyin romanization" while ICU turns it into @collation=pinyin (= -u-co-pinyin). We cannot know which one a user means, so we should probably drop this mapping.

I assume that we still need (some of?) the .Net and POSIX locale ID mappings.

Activity

Show:
Victor Chang
November 7, 2018, 9:13 PM

Thanks!

In the worst case, can we keep the locale IDs locally in Android for 1-2 releases? Though I think Android is likely to be okay.

Markus Scherer
November 7, 2018, 9:25 PM

> can we keep the locale IDs locally in Android for 1-2 releases?

Either we keep them or remove them. If you find that Android needs certain locale IDs then please list them. If Android needs a short-term patch, then that's up to Android.

Victor Chang
November 8, 2018, 5:51 PM

> If you find that Android needs certain locale IDs then please list them.
I don't have a list until we break some codes using the IDs.

>If Android needs a short-term patch, then that's up to Android.
Yes. It's likely to be short-term. Thanks for the confirmation.

Frank Yung-Fong Tang
February 8, 2019, 2:48 AM

The fact that ICU canonicalize
hi-direct / zh-pinyin / zh-stroke / es-ES-preeuro
into
hi-u-co-direct / zh-u-co-pinyin / zh-u-co-stroke / es-ES-u-cu-esp

break test262 tests for v8 to launch Intl.Locale

https://github.com/tc39/test262/blob/master/test/intl402/Locale/constructor-non-iana-canon.js
The tests for
{
tag: "es-ES-preeuro",
maximized: "es-Latn-ES-preeuro",
minimized: "es-preeuro",
},
{
tag: "hi-direct",
maximized: "hi-Deva-IN-direct",
},
{
tag: "zh-pinyin",
maximized: "zh-Hans-CN-pinyin",
},
{
tag: "zh-stroke",
maximized: "zh-Hans-CN-stroke",
},

https://github.com/tc39/test262/blob/master/test/intl402/Locale/constructor-tag.js
The test for "zh-latn-pinyin-pinyin2": "zh-Latn-pinyin-pinyin2",

tracked in
https://bugs.chromium.org/p/v8/issues/detail?id=8260
and
https://bugs.chromium.org/p/v8/issues/detail?id=8246

Frank Yung-Fong Tang
February 11, 2019, 9:19 PM

Markus = do you mind I grab this bug from you?

Fixed

Assignee

Markus Scherer

Reporter

Markus Scherer

Components

Labels

None

Reviewer

None

Priority

medium

Time Needed

Hours

Fix versions

Configure