-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
6u23
-
x86
-
windows_xp
FULL PRODUCT VERSION :
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
The following two Big5 codes are mapped incorrectly
Big5 Decoded-as Should-be
0x8BF8 \u9F9C \uF907
0x9EE5 \u47B6 \uED64
Please refer to Pages 2-37 and 2-45 of
http://www.ogcio.gov.hk/ccli/eng/hkscs/download/e_sect2.pdf
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
public class A {
public static void main(String argv[]) throws Exception {
byte b[] = {(byte)0x8B, (byte)0xF8, (byte)0x9E, (byte)0xE5};
String s = new String(b, "MS950_HKSCS");
System.out.printf("%X %X%n", (int) s.charAt(0), (int) s.charAt(1));
}
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
F907 ED64
ACTUAL -
9F9C 47B6
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public class A {
public static void main(String argv[]) throws Exception {
byte b[] = {(byte)0x8B, (byte)0xF8, (byte)0x9E, (byte)0xE5};
String s = new String(b, "MS950_HKSCS");
System.out.printf("%X %X%n", (int) s.charAt(0), (int) s.charAt(1));
}
}
---------- END SOURCE ----------
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
The following two Big5 codes are mapped incorrectly
Big5 Decoded-as Should-be
0x8BF8 \u9F9C \uF907
0x9EE5 \u47B6 \uED64
Please refer to Pages 2-37 and 2-45 of
http://www.ogcio.gov.hk/ccli/eng/hkscs/download/e_sect2.pdf
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
public class A {
public static void main(String argv[]) throws Exception {
byte b[] = {(byte)0x8B, (byte)0xF8, (byte)0x9E, (byte)0xE5};
String s = new String(b, "MS950_HKSCS");
System.out.printf("%X %X%n", (int) s.charAt(0), (int) s.charAt(1));
}
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
F907 ED64
ACTUAL -
9F9C 47B6
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public class A {
public static void main(String argv[]) throws Exception {
byte b[] = {(byte)0x8B, (byte)0xF8, (byte)0x9E, (byte)0xE5};
String s = new String(b, "MS950_HKSCS");
System.out.printf("%X %X%n", (int) s.charAt(0), (int) s.charAt(1));
}
}
---------- END SOURCE ----------