[loc-en-dev] getISO3Language and getISO3Country

Mark Davis ☕ mark at macchiato.com
Fri Sep 18 14:38:00 PDT 2009


If the get codes are to return just valid codes, then I think the right
references to is Unicode CLDR. That includes by reference all of the BCP 47,
which has stabilized codes for all of the ISO language (2/3 letter), script
(4-letter), country (2-letter & 3 digit) codes that should be considered
valid.

Mark


On Fri, Sep 18, 2009 at 10:17, Yoshito Umaoka <y.umaoka at gmail.com> wrote:

> I have several questions about getISO3Language and getISO3Country.
>
> With the support for some ISO 639-2/639-3/639-5 three letter codes in
> Locale, getISO3Language should be updated.  For example,
>
> new Locale("kok").getISO3Language();
>
> should return "kok", because it's a three letter valid ISO 639-2 code,
> conforming to the BCP 47 language tag.
>
> Q1: What if an unassigned 3 letter code is used?  For example -
>
> new Locale("zzz").getISO3Language();
>
> Q2: What if 3 an ill-formed 3 letter code is used?  For example -
>
> new Locale("123").getISO3Language();
>
> Also, a question for getISO3Country.  We will support UN M.49 area code.
>
> Q3. What if M.49 code is used?  For example -
>
> new Locale("en", "029").getISO3Country()
>
> In addition to this, the current getISO3Country JavaDoc mentions ISO
> 3166-2, which looks inappropriate to me.  What this method is handling is
> ISO 3166-1 alpha-2 codes and ISO 3166-1 alpha-3 codes.  The API doc is
> referencing to http://www.davros.org/misc/iso3166.txt .  It looks this is
> a personal web site and the data is already out of date.  Unfortunately, ISO
> 3166 maintenance agency does not disclose ISO 3166-1 alpha-3 code data.  But
> we obviously want a reference which is public and stable.  I think wikipedia
> has a topic for ISO 3166-1 and contains the code list ->
> http://en.wikipedia.org/wiki/ISO_3166-1  I think this reference would work
> better than the current.  What do you think?
>
> -Yoshito
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/locale-enhancement-dev/attachments/20090918/a2f65e2a/attachment.html 


More information about the locale-enhancement-dev mailing list