You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Bruno P. Kinoshita (JIRA)" <ji...@apache.org> on 2017/02/20 00:13:44 UTC

[jira] [Updated] (LANG-1312) LocaleUtils#toLocale does not support language followed by UN M.49 numeric-3 area code

     [ https://issues.apache.org/jira/browse/LANG-1312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bruno P. Kinoshita updated LANG-1312:
-------------------------------------
    Description: 
These all work:

{code:java}
System.out.println(new Locale("en", "001"));
System.out.println(new Locale("en", "150"));
System.out.println(new Locale("ar", "001"));
{code}

but these all fail with an IllegalArgumentException:

{code:java}
System.out.println(LocaleUtils.toLocale("en_001"));
System.out.println(LocaleUtils.toLocale("en_150"));
System.out.println(LocaleUtils.toLocale("ar_001"));
{code}


  was:
These all work:

{code:java}
System.out.println(new Locale("en", "001"));
System.out.println(new Locale("en", "150"));
System.out.println(new Locale("ar", "001"));
{java}

but these all fail with an IllegalArgumentException:

{code:java}
System.out.println(LocaleUtils.toLocale("en_001"));
System.out.println(LocaleUtils.toLocale("en_150"));
System.out.println(LocaleUtils.toLocale("ar_001"));
{java}



> LocaleUtils#toLocale does not support language followed by UN M.49 numeric-3 area code
> --------------------------------------------------------------------------------------
>
>                 Key: LANG-1312
>                 URL: https://issues.apache.org/jira/browse/LANG-1312
>             Project: Commons Lang
>          Issue Type: Bug
>    Affects Versions: 3.5
>            Reporter: Pascal Schumacher
>            Priority: Minor
>
> These all work:
> {code:java}
> System.out.println(new Locale("en", "001"));
> System.out.println(new Locale("en", "150"));
> System.out.println(new Locale("ar", "001"));
> {code}
> but these all fail with an IllegalArgumentException:
> {code:java}
> System.out.println(LocaleUtils.toLocale("en_001"));
> System.out.println(LocaleUtils.toLocale("en_150"));
> System.out.println(LocaleUtils.toLocale("ar_001"));
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)