Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2201051 | 5.0u27 | Abhijit Saha | P2 | Closed | Fixed | b01 |
JDK-2199444 | 5.0u26-rev | Abhijit Saha | P2 | Closed | Fixed | b04 |
Our CU's customer faces with the difference behavior between jdk6 and jdk5,
when their program tries to output a XML object including tilde(multibyte, \uFF5E) char.
to xml file in Shift-JIS.
REPRODUCE:
1. Compile the attached d.java
2. Invoke "java -showversion d"
3. Invoke "type a.xml"
The results are as followis.
C:\Users\licensees\tilde>java -showversion d
java version "1.5.0_20"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_20-b02)
Java HotSpot(TM) Client VM (build 1.5.0_20-b02, mixed mode)
C:\Users\licensees\tilde>type a.xml
<?xml version="1.0" encoding="Shift_JIS"?><root><data>?</data></root>
C:\Users\tbaba\licensees\childer>set path=C:\Users\tbaba\java\jdk6_18\bin;%path%
C:\Users\licensees\tilde>java -showversion d
java version "1.6.0_18"
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode)
C:\Users\licensees\tilde>type a.xml
<?xml version="1.0" encoding="Shift_JIS" standalone="no"?><root><data>~</
data></root>
The above result says,
JDK5 : tilde is output as "?"
JDK6 : tilde is outpu ~ (escaped)
The way of handling tilde in jdk6 should be backport to jdk5.
INVESTIGATION:
SUN_CHAR2BYTE_CONVERTER_METHOD to which getCharToByteConverter(String encoding) in Encodings.java refers is always null in jdk5. This seems to cause thsi problem in jdk5.
NOTE:
Suggested fix is provided for jdk5u24. Please see attached "Encodings.java".
when their program tries to output a XML object including tilde(multibyte, \uFF5E) char.
to xml file in Shift-JIS.
REPRODUCE:
1. Compile the attached d.java
2. Invoke "java -showversion d"
3. Invoke "type a.xml"
The results are as followis.
C:\Users\licensees\tilde>java -showversion d
java version "1.5.0_20"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_20-b02)
Java HotSpot(TM) Client VM (build 1.5.0_20-b02, mixed mode)
C:\Users\licensees\tilde>type a.xml
<?xml version="1.0" encoding="Shift_JIS"?><root><data>?</data></root>
C:\Users\tbaba\licensees\childer>set path=C:\Users\tbaba\java\jdk6_18\bin;%path%
C:\Users\licensees\tilde>java -showversion d
java version "1.6.0_18"
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode)
C:\Users\licensees\tilde>type a.xml
<?xml version="1.0" encoding="Shift_JIS" standalone="no"?><root><data>~</
data></root>
The above result says,
JDK5 : tilde is output as "?"
JDK6 : tilde is outpu ~ (escaped)
The way of handling tilde in jdk6 should be backport to jdk5.
INVESTIGATION:
SUN_CHAR2BYTE_CONVERTER_METHOD to which getCharToByteConverter(String encoding) in Encodings.java refers is always null in jdk5. This seems to cause thsi problem in jdk5.
NOTE:
Suggested fix is provided for jdk5u24. Please see attached "Encodings.java".
- backported by
-
JDK-2199444 how to handle tilde char. in jdk6 should be backport to jdk5
-
- Closed
-
-
JDK-2201051 how to handle tilde char. in jdk6 should be backport to jdk5
-
- Closed
-