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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.5
    • 3.6
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: