-
Bug
-
Resolution: Fixed
-
P2
-
6
-
b27
-
b81
-
x86
-
windows_2000
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2213768 | 5.0u33 | Sean Coffey | P3 | Closed | Fixed | b08 |
FULL PRODUCT VERSION :
java version "1.6.0-beta2"
Java(TM) SE Runtime Environment (build 1.6.0-beta2-b78)
Java HotSpot(TM) Client VM (build 1.6.0-beta2-b78, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Windows 2000 SP 4
A DESCRIPTION OF THE PROBLEM :
I found that JExcel API sometimes returns wrong contents and I seem to have tracked it down to the following test case:
byte[] data = new byte[] {65, 0, 114, 0, 105, 0, 97, 0, 108, 0};
String s = new String(data,"UnicodeLittle");
System.out.println(s);
This prints out "Arial" with JDK1.5 and some garbage with JDK1.6.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public class UnicodeLitteTest
{
public static void main(String[] args) throws Exception
{
byte[] data = new byte[] {65, 0, 114, 0, 105, 0, 97, 0, 108, 0};
String s = new String(data,"UnicodeLittle");
System.out.println(s);
}
}
---------- END SOURCE ----------
Release Regression From : 5.0u6
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
java version "1.6.0-beta2"
Java(TM) SE Runtime Environment (build 1.6.0-beta2-b78)
Java HotSpot(TM) Client VM (build 1.6.0-beta2-b78, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Windows 2000 SP 4
A DESCRIPTION OF THE PROBLEM :
I found that JExcel API sometimes returns wrong contents and I seem to have tracked it down to the following test case:
byte[] data = new byte[] {65, 0, 114, 0, 105, 0, 97, 0, 108, 0};
String s = new String(data,"UnicodeLittle");
System.out.println(s);
This prints out "Arial" with JDK1.5 and some garbage with JDK1.6.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public class UnicodeLitteTest
{
public static void main(String[] args) throws Exception
{
byte[] data = new byte[] {65, 0, 114, 0, 105, 0, 97, 0, 108, 0};
String s = new String(data,"UnicodeLittle");
System.out.println(s);
}
}
---------- END SOURCE ----------
Release Regression From : 5.0u6
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
- backported by
-
JDK-2213768 UnicodeLittle is BIG-endian
-
- Closed
-
- relates to
-
JDK-6448787 Regression: UnicodeLittle broken on 1.4.2_12
-
- Resolved
-
-
JDK-6230129 Need a UTF_16LE_Marked charset
-
- Resolved
-