-
Bug
-
Resolution: Fixed
-
P2
-
1.2.0
-
1.2beta3
-
sparc
-
solaris_2.6
-
Not verified
JDK version:JDK-1.2beta3-H
OS:Solaris 2.6
Platform: Sparc 5
Locale:zh
If we load a class from a jar file, there will cause a converter problem.
Following is a short program.
===============================t.java====================================
import java.util.*;
public class t {
public static void main(String args[]) {
byte b[] = "‚CC".getBytes();
String cc = null;
try {
cc = new String(b,"GB2312");
} catch (Exception ex) {
System.out.println(ex);
System.exit(0);
}
System.out.println("OK");
}
}
=========================================================================
Take as the following steps:
javac t.java
java t
OK
jar cvf tt.jar t.class
rm t.class
java -classpath ${CLASSPATH}:./tt.jar t
java.io.UnsupportedEncodingException
jim.hu@prc 1998-02-23
OS:Solaris 2.6
Platform: Sparc 5
Locale:zh
If we load a class from a jar file, there will cause a converter problem.
Following is a short program.
===============================t.java====================================
import java.util.*;
public class t {
public static void main(String args[]) {
byte b[] = "‚CC".getBytes();
String cc = null;
try {
cc = new String(b,"GB2312");
} catch (Exception ex) {
System.out.println(ex);
System.exit(0);
}
System.out.println("OK");
}
}
=========================================================================
Take as the following steps:
javac t.java
java t
OK
jar cvf tt.jar t.class
rm t.class
java -classpath ${CLASSPATH}:./tt.jar t
java.io.UnsupportedEncodingException
jim.hu@prc 1998-02-23