6 Replies Latest reply on May 13, 2012 1:50 AM by darrylburke

    South Sudan (SS) not known in Locale of Java

      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:

      Also Java seems to follow the ISO 3166 standard and they also state that South Sudan SS exists:

      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

        • 1. Re: South Sudan (SS) not known in Locale of Java
          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
            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()) {
            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

            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
            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\

            java.vm.specification.vendor: Oracle Corporation
            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
            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
              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
                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
                  The reported bug has been evaluated and is duplicate of 7085757.
                  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:
                  • 6. Re: South Sudan (SS) not known in Locale of Java
                    Moved from Java Programming