-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
5.0
-
sparc
-
solaris_10
FULL PRODUCT VERSION :
java version "1.5.0_08"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)
Java HotSpot(TM) Server VM (build 1.5.0_08-b03, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
SunOS dolly 5.10 Generic_118822-30 sun4u sparc SUNW,Ultra-60
A DESCRIPTION OF THE PROBLEM :
The String constructor converts the euro sign (0xa4) to ? (0x3f) with charset ISO-8859-15 on solaris.
It works on the windows plattform.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
byte[] bytes={0x3f,0x20,-92,0x20,0x31}; // -92 is the euro sign (0xa4)
String str= new String(bytes,"ISO8859_15");
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
str="? € 1"
str.getBytes()={0x3f,0x20,0x20ac,0x20,0x31}
ACTUAL -
str="? ? 1"
str.getBytes()={0x3f,0x20,0x3f,0x20,0x31}
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
byte[] bytes={0x3f,0x20,-92,0x20,0x31}; // -92 is the euro sign (0xa4)
String str= new String(bytes,"ISO8859_15");
---------- END SOURCE ----------
java version "1.5.0_08"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)
Java HotSpot(TM) Server VM (build 1.5.0_08-b03, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
SunOS dolly 5.10 Generic_118822-30 sun4u sparc SUNW,Ultra-60
A DESCRIPTION OF THE PROBLEM :
The String constructor converts the euro sign (0xa4) to ? (0x3f) with charset ISO-8859-15 on solaris.
It works on the windows plattform.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
byte[] bytes={0x3f,0x20,-92,0x20,0x31}; // -92 is the euro sign (0xa4)
String str= new String(bytes,"ISO8859_15");
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
str="? € 1"
str.getBytes()={0x3f,0x20,0x20ac,0x20,0x31}
ACTUAL -
str="? ? 1"
str.getBytes()={0x3f,0x20,0x3f,0x20,0x31}
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
byte[] bytes={0x3f,0x20,-92,0x20,0x31}; // -92 is the euro sign (0xa4)
String str= new String(bytes,"ISO8859_15");
---------- END SOURCE ----------