-
Bug
-
Resolution: Fixed
-
P3
-
23
-
b10
-
Verified
Starting in JDK 23, the following program behaves differently when -Djava.locale.useOldISOCodes=true is set.
```
import java.util.List;
import java.util.Locale;
class T {
public static void main(String[] args) {
for (String l : List.of("iw", "fa", "iw")) {
Locale locale = new Locale(l);
Locale.setDefault(locale);
String displayName = locale.getDisplayName();
System.err.println(locale);
System.err.println(displayName);
System.err.println(Character.getDirectionality(displayName.charAt(0)));
}
}
}
```
$ java -fullversion
openjdk full version "22.0.2+9-70"
$ java -Djava.locale.useOldISOCodes=true T
iw
עברית
1
fa
فارسی
2
iw
עברית
1
$ java -fullversion
openjdk full version "23-ea+34-2361"
$ java -Djava.locale.useOldISOCodes=true T
iw
Hebrew
0
fa
فارسی
2
iw
Hebrew
0
```
import java.util.List;
import java.util.Locale;
class T {
public static void main(String[] args) {
for (String l : List.of("iw", "fa", "iw")) {
Locale locale = new Locale(l);
Locale.setDefault(locale);
String displayName = locale.getDisplayName();
System.err.println(locale);
System.err.println(displayName);
System.err.println(Character.getDirectionality(displayName.charAt(0)));
}
}
}
```
$ java -fullversion
openjdk full version "22.0.2+9-70"
$ java -Djava.locale.useOldISOCodes=true T
iw
עברית
1
fa
فارسی
2
iw
עברית
1
$ java -fullversion
openjdk full version "23-ea+34-2361"
$ java -Djava.locale.useOldISOCodes=true T
iw
Hebrew
0
fa
فارسی
2
iw
Hebrew
0
- relates to
-
JDK-8174269 Remove COMPAT locale data provider from JDK
- Resolved
- links to
-
Commit(master) openjdk/jdk/d19ba81c
-
Review(master) openjdk/jdk/20474