JDK-4086927 : wrong default Norwegian locale (Bokm��l instead of Nynorsk)
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 1.2.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_2.5.1
  • CPU: sparc
  • Submitted: 1997-10-17
  • Updated: 1998-02-13
  • Resolved: 1998-02-13
Related Reports
Duplicate :  
Description

Name: laC46010			Date: 10/17/97



Constructor Locale("no", "NO") creates object of "no_NO_B" localization
instead of "no_NO" localization as specified in 
"JDK 1.1 Internationalization Specification" 
[see http://java.sun.com/products/jdk/1.1/intl/html/intlspec.doc2.html]:

     Table 0-1 Locales Supported By JDK 1.11
...
 no_NO     Norwegian (Nynorsk)   Norway 
 no_NO_B   Norwegian (Bokm��l)    Norway 
 

An example below produces the following output:
--------------output----------------
failed: locale Norwegian (Nynorsk) (Norway) return - Norwegian (Bokm��l) (Norway)

--------------NO_NO_fails.java--------------------
import java.util.Locale;

class NO_NO_fails {
    public static void main(String argv[]) {
	Locale NO_NO = new Locale("no", "NO");
	String result = NO_NO.getDisplayName();
	if (result.equals("Norwegian (Nynorsk) (Norway)")) {
	    System.out.println("OK");
	} else {
	    System.out.println("failed: locale " + 
			       "Norwegian (Nynorsk) (Norway) return - " +
	                       result);
	}
    }
}
---------------------------------------------------------

======================================================================

Comments
EVALUATION This bug reflects two problems. The first is an old problem that's been corrected. That is that no_NO represented the Nynorsk variant of Norwegian rather than the Bokmal variant. The second problem still exists. That is that the object l = new Locale("no","NO") is created without a variant and l.getVariant will return "" BUT l.getDisplayVariant will return "B". If Bokmal is the standard dialect, then it is not a variant. It might be OK to have l.getLanguage return "Norwegian(Bokmal)" but Bokmal should not be a variant. brian.beck@Eng 1998-01-07 -------------------------------------------------------------------------------- This problem was actually fixed by the fix for bug #4101316. I'm closing this bug report as a duplicate of that bug.
11-06-2004