Results 1 to 2 of 2
  1. #1
    fkeller is offline Member
    Join Date
    Jan 2009
    Rep Power

    Angry Missing 4 ISO 3166-1 codes in java.util.Locale


    I have noticed that the list of ISO 3166-1 codes listed in java.util.Locale is not complete. It contains 242 codes instead of 246 officially. The JE (Jersey) code is missing for example.

    The following code returns 242 ISO codes

    String[] isoCountries = java.util.Locale.getISOCountries();
    System.out.println("nbr of ISO: "+isoCountries.length);
    for(int i = 0; i<isoCountries.length;i++) {

    nbr of ISO: 242

    Does anyone know how to get the complete list of ISO?
    Or is there a way to complete the list by coding a custom country (iso, countryName, ...) ?

    Thank you for your replies and help!

  2. #2
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Rep Power


    The locale codes determine many things within Java, such as character sets. If the four codes are not listed, then they are not implemented. You might try posting on a Sun bug forum and asking what the status of these four codes is. I'm assuming you need to use them...

Similar Threads

  1. Replies: 1
    Last Post: 12-15-2008, 09:11 PM
  2. java codes
    By Balajee in forum AWT / Swing
    Replies: 1
    Last Post: 09-30-2008, 06:04 PM
  3. setting JSTL locale "java.util.MissingResourceException"
    By sabelosimelane in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 09-04-2008, 05:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts