JDK-5005601 : Norwegian locales not in sync with ISO639-1/ISO639-2
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2004-03-01
  • Updated: 2011-05-26
  • Resolved: 2011-05-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b112Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
Name: rmT116609			Date: 03/01/2004


FULL PRODUCT VERSION :
java version "1.5.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b32c)
Java HotSpot(TM) Client VM (build 1.5.0-beta-b32c, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]

A DESCRIPTION OF THE PROBLEM :
The 2- and 3-letter codes for the two Norwegian languages are not in sync with ISO639-1/ISO639-2 (see: http://www.loc.gov/standards/iso639-2/englangn.html)


STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run enclosed source code.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
/* ... these are what I prefer as the two languages share the same characteristics concerning dates, separators and currency. (not sure about the casing of the variant code) */

;;no;nor;;Norwegian;no
NO;NOR;no;nor;;Norwegian (Norway);no_NO
NO;NOR;no;nor;Bokm������l;Norwegian (Norwayh,Bokm������l);no_NO_NB
NO;NOR;no;nor;Nynorsk;Norwegian (Norway,Nynorsk);no_NO_NN

/* ... but maybe this is more correct if one is to follow ISO to the letter ... */

;;no;nor;;Norwegian;no
;;nb;nob;;Norwegian Bokm������l;nb
;;nn;nno;;Norwegian Nynorsk;nn
NO;NOR;no;nor;;Norwegian (Norway);no_NO
NO;NOR;nb;nob;;Norwegian Bokm������l (Norway);nb_NO
NO;NOR;nn;nno;;Norwegian Nynorsk (Norway);nn_NO

/* ... or maybe all of them... :-) */
ACTUAL -
;;no;nor;;Norwegian;no
NO;NOR;no;nor;;Norwegian (Norway);no_NO
NO;NOR;no;nor;Nynorsk;Norwegian (Norway,Nynorsk);no_NO_NY

ERROR MESSAGES/STACK TRACES THAT OCCUR :
No errors.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import java.util.*;

class Test {

public static void main(String a[]) {

     Locale.setDefault(Locale.ENGLISH);
        for (Locale locale : Locale.getAvailableLocales()) { /* 1.5 */
            System.out.println(
                    locale.getCountry() + ";" +
                    locale.getISO3Country() + ";" +
                    locale.getLanguage() + ";" +
                    locale.getLanguage() + ";" +
                    locale.getDisplayVariant() +";" +
                    locale.getDisplayName() + ";" +
                    locale);
        }

}
}

---------- END SOURCE ----------
(Incident Review ID: 240885) 
======================================================================

Comments
EVALUATION This issue was resolved along with the Locale enhancement in JDK7 (6875847)
19-10-2010

EVALUATION Retargeting this to Dolphin
02-06-2006

EVALUATION Fix requires installing new locales and modifying and/or removing some existing. ###@###.### 2004-03-08 Four new locales are going to be installed, one to be removed. ###@###.### 2004-03-15 In fact all the requested locales could be easily instantiated. Try the following piece of code: import java.util.Locale; public class Bug5005601 { static String[][] locales2Test = new String[][] { { "no", "" }, { "no", "NO"}, { "nb", "" }, { "nb", "NO" }, { "nn", "" }, { "nn", "NO" } }; static String[] locales2TestExpected = new String[] { ";;no;nor;;Norwegian;no", "NO;NOR;no;nor;;Norwegian (Norway);no_NO", ";;nb;nob;;Norwegian Bokm\u00e5l;nb", "NO;NOR;nb;nob;;Norwegian Bokm\u00e5l (Norway);nb_NO", ";;nn;nno;;Norwegian Nynorsk;nn", "NO;NOR;nn;nno;;Norwegian Nynorsk (Norway);nn_NO" }; public static void main(String a[]) { Locale.setDefault(Locale.ENGLISH); for (int i = 0; i < locales2Test.length; i++) { Locale locale = new Locale(locales2Test[i][0], locales2Test[i][1]); String inJVM = locale.getCountry() + ";" + locale.getISO3Country() + ";" + locale.getLanguage() + ";" + locale.getISO3Language() + ";" + locale.getDisplayVariant() +";" + locale.getDisplayName() + ";" + locale; System.out.println(locales2Test[i][0] + "_" + locales2Test[i][1] + "\t" + (locales2TestExpected[i].equals(inJVM) ? "Passed" : "Failed")); } } } The RFE will close. ###@###.### 2004-03-23 Will provide nb_NO and nn_NO, instead of no_NO and no_NO_NY. ###@###.### 2005-05-20 22:16:42 GMT
23-03-2004