-
Bug
-
Resolution: Fixed
-
P3
-
5.0
-
b78
-
x86
-
linux
FULL PRODUCT VERSION :
java version "1.5.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-b09)
Java HotSpot(TM) Client VM (build 1.5.0_02-b09, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
True for Windows and Linux (all versions)
A DESCRIPTION OF THE PROBLEM :
XMLEncoder will produce invalid XML under a range of circumstances. Valid characters in XML (from http://www.w3.org/TR/REC-xml/) are:
"Character Range
[2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] /* any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. */
"
No character that is outside this range may be put in an XML file.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Any function that returns a string where ANY of the characters are not permitted by the XML specification, or any method that returns a char where the char is not in the permitted range.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Strings should be encoded (Base64) before saving them to the file. Characters could be saved as ints or encoded strings.
ACTUAL -
Invalid characters are encoded directly into the file.
REPRODUCIBILITY :
This bug can be reproduced always.
###@###.### 2005-04-18 19:36:08 GMT
java version "1.5.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-b09)
Java HotSpot(TM) Client VM (build 1.5.0_02-b09, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
True for Windows and Linux (all versions)
A DESCRIPTION OF THE PROBLEM :
XMLEncoder will produce invalid XML under a range of circumstances. Valid characters in XML (from http://www.w3.org/TR/REC-xml/) are:
"Character Range
[2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] /* any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. */
"
No character that is outside this range may be put in an XML file.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Any function that returns a string where ANY of the characters are not permitted by the XML specification, or any method that returns a char where the char is not in the permitted range.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Strings should be encoded (Base64) before saving them to the file. Characters could be saved as ints or encoded strings.
ACTUAL -
Invalid characters are encoded directly into the file.
REPRODUCIBILITY :
This bug can be reproduced always.
###@###.### 2005-04-18 19:36:08 GMT
- relates to
-
JDK-6582164 JavaBeans tests should be open source
- Resolved
-
JDK-4625418 RFE: LTP: java.beans.XMLEncoder should have an option to specify other charset than UTF-8
- Closed