Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-1312

LocaleUtils#toLocale does not support language followed by UN M.49 numeric-3 area code

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.5
    • Fix Version/s: 3.6
    • Component/s: None
    • Labels:
      None

      Description

      These all work:

      System.out.println(new Locale("en", "001"));
      System.out.println(new Locale("en", "150"));
      System.out.println(new Locale("ar", "001"));
      

      but these all fail with an IllegalArgumentException:

      System.out.println(LocaleUtils.toLocale("en_001"));
      System.out.println(LocaleUtils.toLocale("en_150"));
      System.out.println(LocaleUtils.toLocale("ar_001"));
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pascalschumacher Pascal Schumacher
                Reporter:
                pascalschumacher Pascal Schumacher
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: