This discussion is archived
6 Replies Latest reply: May 13, 2012 1:50 AM by DarrylBurke RSS

South Sudan (SS) not known in Locale of Java

926094 Newbie
Currently Being Moderated
I'm currently programming a payment program and I'm encountering an issue with my validation of BIC's. I have a giant list of all known BIC's but one seems to fail (I validate on it's ISO country code where is use the build in Locale API from Java.
But unfortunately it doesn't seem to know South Sudan (SS) as valid ISO country, but according to Wikipedia and Swift (=keeper of the BIC's) South Sudan is a valid country and ISO:
http://en.wikipedia.org/wiki/ISO_3166-2:SS

Also Java seems to follow the ISO 3166 standard and they also state that South Sudan SS exists:
http://www.iso.org/iso/support/country_codes/iso_3166_code_lists/iso-3166-1_decoding_table.htm#SS

I can work around this (but I don't like to create exceptions for this sort of things :p), but maybe someone can give me an explanation. Or should I submit a bug report ;)?

Thanks in advanced

Regards
  • 1. Re: South Sudan (SS) not known in Locale of Java
    EJP Guru
    Currently Being Moderated
    What version of Java? The code elements for South Sudan were added on 2011‑08‑09. Java versions prior to then will tend not to have it.
  • 2. Re: South Sudan (SS) not known in Locale of Java
    926094 Newbie
    Currently Being Moderated
    Updated yesterday to be sure I had the latest version:
    Java JDK 7.0u4
    NetBeans 7.1.2

    Below I'm listing all country code's available to Java. SS doesn't seem to be in there :-/

    Result of following code
    Locale country = new Locale("en", "SS");
    System.out.println(country.getDisplayCountry() + "\nList all countery CODE");
    for (String con : Locale.getISOCountries()) {
         System.out.println(con);
    }
    
    Properties p = System.getProperties();
    Enumeration keys = p.keys();
    while (keys.hasMoreElements()) {
         String key = (String) keys.nextElement();
         String value = (String) p.get(key);
         System.out.println(key + ": " + value);
    }
    SS >> This should be South Sudan, but since Java doesn't know it, they display SS
    List all countery CODE
    AD|AE|AF|AG|AI|AL|AM|AN|AO|AQ|AR|AS|AT|AU|AW|AX|AZ|BA|BB|BD|BE|BF|BG|BH|BI|BJ|BL|BM|BN|BO|BQ|BR|BS|BT|BV|BW|BY|BZ|CA|CC|CD|CF|CG|CH|CI|CK|CL|CM|CN|CO|CR|CU|CV|CW|CX|CY|CZ|DE|DJ|DK|DM|DO|DZ|EC|EE|EG|EH|ER|ES|ET|FI|FJ|FK|FM|FO|FR|GA|GB|GD|GE|GF|GG|GH|GI|GL|GM|GN|GP|GQ|GR|GS|GT|GU|GW|GY|HK|HM|HN|HR|HT|HU|ID|IE|IL|IM|IN|IO|IQ|IR|IS|IT|JE|JM|JO|JP|KE|KG|KH|KI|KM|KN|KP|KR|KW|KY|KZ|LA|LB|LC|LI|LK|LR|LS|LT|LU|LV|LY|MA|MC|MD|ME|MF|MG|MH|MK|ML|MM|MN|MO|MP|MQ|MR|MS|MT|MU|MV|MW|MX|MY|MZ|NA|NC|NE|NF|NG|NI|NL|NO|NP|NR|NU|NZ|OM|PA|PE|PF|PG|PH|PK|PL|PM|PN|PR|PS|PT|PW|PY|QA|RE|RO|RS|RU|RW|SA|SB|SC|SD|SE|SG|SH|SI|SJ|SK|SL|SM|SN|SO|SR|ST|SV|SX|SY|SZ|TC|TD|TF|TG|TH|TJ|TK|TL|TM|TN|TO|TR|TT|TV|TW|TZ|UA|UG|UM|US|UY|UZ|VA|VC|VE|VG|VI|VN|VU|WF|WS|YE|YT|ZA|ZM|ZW

    java.runtime.name: Java(TM) SE Runtime Environment
    sun.boot.library.path: C:\Program Files (x86)\Java\jdk1.7.0_04\jre\bin
    java.vm.version: 23.0-b21
    user.country.format: BE
    java.vm.vendor: Oracle Corporation
    java.vendor.url: http://java.oracle.com/
    path.separator: ;
    java.vm.name: Java HotSpot(TM) Client VM
    file.encoding.pkg: sun.io
    user.country: US
    user.script:
    sun.java.launcher: SUN_STANDARD
    sun.os.patch.level: Service Pack 1
    java.vm.specification.name: Java Virtual Machine Specification
    user.dir: D:\Steven\Documenten\Java\PaymentGenerator
    java.runtime.version: 1.7.0_04-b20
    java.awt.graphicsenv: sun.awt.Win32GraphicsEnvironment
    java.endorsed.dirs: C:\Program Files (x86)\Java\jdk1.7.0_04\jre\lib\endorsed
    os.arch: x86
    java.io.tmpdir: C:\Users\Steven\AppData\Local\Temp\
    line.separator:

    java.vm.specification.vendor: Oracle Corporation
    user.variant:
    os.name: Windows 7
    sun.jnu.encoding: Cp1252
    java.library.path: C:\Program Files (x86)\Java\jdk1.7.0_04\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;"C:\Program Files (x86)\Java\jre7\bin";.
    java.specification.name: Java Platform API Specification
    java.class.version: 51.0
    sun.management.compiler: HotSpot Client Compiler
    os.version: 6.1
    user.home: C:\Users\Steven
    user.timezone:
    java.awt.printerjob: sun.awt.windows.WPrinterJob
    file.encoding: UTF-8
    java.specification.version: 1.7
    java.class.path: C:\Program Files (x86)\Java\jdk1.7.0_03\db\lib\derbyclient.jar;C:\Program Files (x86)\Java\jdk1.7.0_03\db\lib\derby.jar;D:\Steven\Documenten\Java\lib\jdom-1.1.3.jar;D:\Steven\Documenten\Java\lib\commons-lang3-3.1-sources.jar;D:\Steven\Documenten\Java\PaymentGenerator\build\classes
    user.name: Steven
    java.vm.specification.version: 1.7
    sun.java.command: eu.uytterhoeven.paymentgenerator.bank.BIC
    java.home: C:\Program Files (x86)\Java\jdk1.7.0_04\jre
    sun.arch.data.model: 32
    user.language: en
    java.specification.vendor: Oracle Corporation
    user.language.format: nl
    awt.toolkit: sun.awt.windows.WToolkit
    java.vm.info: mixed mode, sharing
    java.version: 1.7.0_04
    java.ext.dirs: C:\Program Files (x86)\Java\jdk1.7.0_04\jre\lib\ext;C:\Windows\Sun\Java\lib\ext
    sun.boot.class.path: C:\Program Files (x86)\Java\jdk1.7.0_04\jre\lib\resources.jar;C:\Program Files (x86)\Java\jdk1.7.0_04\jre\lib\rt.jar;C:\Program Files (x86)\Java\jdk1.7.0_04\jre\lib\sunrsasign.jar;C:\Program Files (x86)\Java\jdk1.7.0_04\jre\lib\jsse.jar;C:\Program Files (x86)\Java\jdk1.7.0_04\jre\lib\jce.jar;C:\Program Files (x86)\Java\jdk1.7.0_04\jre\lib\charsets.jar;C:\Program Files (x86)\Java\jdk1.7.0_04\jre\lib\jfr.jar;C:\Program Files (x86)\Java\jdk1.7.0_04\jre\classes
    java.vendor: Oracle Corporation
    file.separator: \
    java.vendor.url.bug: http://bugreport.sun.com/bugreport/
    sun.io.unicode.encoding: UnicodeLittle
    sun.cpu.endian: little
    sun.desktop: windows
    sun.cpu.isalist: pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86

    Edited by: 923091 on Apr 30, 2012 1:56 PM
  • 3. Re: South Sudan (SS) not known in Locale of Java
    jschellSomeoneStoleMyAlias Expert
    Currently Being Moderated
    Pretty sure there is a tool somewhere that lets you define your own locales. It also explains what the the data looks like and where to find the file. So you could go look to see what is in there.
  • 4. Re: South Sudan (SS) not known in Locale of Java
    926094 Newbie
    Currently Being Moderated
    Don't really care if there is or isn't a tool to define your own locales.
    I'm just reporting that it is missing. If they state that they are using ISO-3166 as reference to the country codes than if the ISO-3166 gets an update they should update it too.
    It's almost a year that South Sudan is independent, time to add this ;)

    Reported it as bug with ID 7166789
  • 5. Re: South Sudan (SS) not known in Locale of Java
    926094 Newbie
    Currently Being Moderated
    The reported bug has been evaluated and is duplicate of 7085757.
    Comment:
    This CR is duplicate of 7085757 Currency Data: ISO 4217 Amendment 152.

    7085757 is fixed in Java 8, but not 7 update.
    Posted Date : 2012-05-10 02:11:07.0

    For more info:
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7166789
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7085757
  • 6. Re: South Sudan (SS) not known in Locale of Java
    DarrylBurke Guru Moderator
    Currently Being Moderated
    Moved from Java Programming

    db

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points