Name: asR10013 Date: 04/27/2000
The following code demonstrates unexpected behavior of the JVM.
Exception java.lang.InternalError is thrown as a result of method
String.getBytes invocation on line 4.
------------------------ test.java -----------------------------------
1 class test {
2 public static void main(String args[]) throws Exception {
3 String s = "\u3000";
4 byte[] ba = s.getBytes("Cp933");
5 }
6 }
-------------------------- output ------------------------------------
$ java -version
java version "1.3.0beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0beta-b01)
Classic VM (build 1.3.0beta-b01, green threads, nojit)
$ java test
Exception in thread "main" java.lang.InternalError: Converter malfunction: sun.io.CharToByteCp933
at java.lang.String.getBytes(String.java:633)
at java.lang.String.getBytes(String.java:665)
at test.main(test.java:4)
----------------------------------------------------------------------
The same results are observed under linux java version "1.2.2",
Solaris java version "1.2.2" and Solaris java version "1.3.0rc3".
======================================================================
- relates to
-
JDK-4296969 Incorrect behaviours of several character converters
-
- Closed
-