-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
8u271
The method locale.getDisplayCountry when used with Alpha-2 code "CZ" prints
"Czech Republic". It should print "Czechia". The output is inconsistent
with other country names.
The ISO 3166 lists codes and names of each country.
For example: for the country of Austria.
https://www.iso.org/obp/ui/#iso:code:3166:AT
This shows the Alpha-2 code, the Short name, the Short name lower case, and
the Full Name.
For Austria and every other country code that I have tested,
getDisplayCountry prints the Short name lower case.
The Short name lower case for the Czech Republic is "Czechia" which is what
is expected.
But, for the Alpha-2 code of "CZ" the Full name is printed instead.
Test case: Test_locale.java
- - -
import java.util.Locale;
public class Test_locale {
public static void main(String[] args){
Locale loc = new Locale ("", "CZ");
System.out.println(loc.getDisplayCountry());
}
}
- - -
C:>java Test_locale
Czech Republic
$ java Test_locale (Linux)
Czech Republic
"Czech Republic". It should print "Czechia". The output is inconsistent
with other country names.
The ISO 3166 lists codes and names of each country.
For example: for the country of Austria.
https://www.iso.org/obp/ui/#iso:code:3166:AT
This shows the Alpha-2 code, the Short name, the Short name lower case, and
the Full Name.
For Austria and every other country code that I have tested,
getDisplayCountry prints the Short name lower case.
The Short name lower case for the Czech Republic is "Czechia" which is what
is expected.
But, for the Alpha-2 code of "CZ" the Full name is printed instead.
Test case: Test_locale.java
- - -
import java.util.Locale;
public class Test_locale {
public static void main(String[] args){
Locale loc = new Locale ("", "CZ");
System.out.println(loc.getDisplayCountry());
}
}
- - -
C:>java Test_locale
Czech Republic
$ java Test_locale (Linux)
Czech Republic
- duplicates
-
JDK-8255086 Update the root locale display names
- Resolved
- relates to
-
JDK-8255086 Update the root locale display names
- Resolved