[loc-en-dev] Comments on the locale enhancement proposal
Masayoshi Okutsu
Masayoshi.Okutsu at Sun.COM
Wed Jan 21 00:31:10 PST 2009
On 1/21/2009 9:13 AM, Doug Felt wrote:
>
>
> On Tue, Jan 20, 2009 at 4:04 PM, Masayoshi Okutsu
> <Masayoshi.Okutsu at sun.com <mailto:Masayoshi.Okutsu at sun.com>> wrote:
>
> I think it's obvious that we can't support old data with new
> identifiers perfectly, like zh_Hans_CN and zh_Hant_CN. When we
> can't support both, I prefer to define a simple algorithm to
> produce a look-up sequences with minimum exceptions. [...]
>
>
> Can define one so we can understand what cases you intend to handle
> and how?
My preference is:
(1) Treat language+script as a writingsystem which produces sequence
language_script -> language.
(2) Apply the traditional sequence production rule to
writingsystem_country_variant
writingsystem_country_variant
writingsystem_country
writingsystem
each of which produces language_script -> language. Therefore, the
entire sequence is:
language_script_country_variant
language_country_variant
language_script_country
language_country
language_script
language
For example, the sequence for zh_Hans_CN is:
zh_Hans_CN
zh_CN
zh_Hans
zh
while the proposed one is:
zh_Hans_CN
zh_Hans
zh_CN
zh
(3) If no script is given, the sequence is the same as the traditional one.
language_country_variant
language_country
language
(4) Exceptions are Norwegian and Hebrew.
no_NO -> nb_NO -> no -> nb
no_NO_NY -> nn_NO -> no_NO -> nn -> no
nn_NO -> no_NO_NY -> nn -> no
nb_NO -> no_NO -> nb -> no
he_IL -> iw_IL -> he -> iw
iw_IL -> he_IL -> iw -> he
Actually, these Norwegian and Hebrew sequences are what Naoto and I
tried to support in JDK6. But we gave it up due to a compatibility
problem reported by a customer. The problem is not the sequences, but
the normalization in Locale: iw->he.
Masayoshi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/locale-enhancement-dev/attachments/20090121/0ace7b53/attachment.html
More information about the locale-enhancement-dev
mailing list