-
Bug
-
Resolution: Fixed
-
P3
-
11.0.20, 17.0.8, 21, 22
-
b01
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8312324 | openjdk8u382 | Andrew Hughes | P3 | Resolved | Fixed | b05 |
This test:
$ cat Test.java
import java.nio.charset.Charset;
public class Test {
public static void main(String[] args) {
Charset.forName("GB18030");
if ("2000".equals(System.getProperty("jdk.charset.GB18030"))) {
Charset.forName("gb18030-2000");
} else {
Charset.forName("gb18030-2022");
}
}
}
Fails when run as such:
$ LANG=zh_CN.GB18030 ./build/linux-x86_64-server-release/images/jdk/bin/java -Djdk.charset.GB18030=2000 Test
Exception in thread "main" java.nio.charset.UnsupportedCharsetException: gb18030-2000
at java.base/java.nio.charset.Charset.forName(Charset.java:543)
at Test.main(Test.java:6)
$ echo $?
1
- backported by
-
JDK-8312324 gb18030-2000 not selectable with LANG=zh_CN.GB18030 after JDK-8301119
- Resolved
- relates to
-
JDK-8301119 Support for GB18030-2022
- Resolved