-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.2.0
-
sparc
-
solaris_2.5.1
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);
}
}
}
---------------------------------------------------------
======================================================================
- duplicates
-
JDK-4101316 getDisplayName for Locale "de" returns German (Germany) rather than German
- Closed