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

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

    Hi,

    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++) {
    System.out.println(isoCountries[i]);
    }

    nbr of ISO: 242
    AD
    AE
    AF
    ....

    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
    Posts
    1,046
    Rep Power
    8

    Default

    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
  •