-
Bug
-
Resolution: Fixed
-
P4
-
None
-
b63
-
Verified
XML parsers are only required to support UTF-8 and UTF-16, see:
http://www.w3.org/TR/REC-xml/#charencoding
Unfortunately the Properties.storeToXML and loadFromXML methods do not specify how unsupported encodings should be handled. This creates a problem for alternative implementations that may not support all encodings.
At this time (verified with jdk6, jdk7 and jdk8-b58) the behavior is:
loadFromXML throws UnsupportedEncodingException
storeToXML prints a warnings to System.err and silently stores the document in UTF-8.
http://www.w3.org/TR/REC-xml/#charencoding
Unfortunately the Properties.storeToXML and loadFromXML methods do not specify how unsupported encodings should be handled. This creates a problem for alternative implementations that may not support all encodings.
At this time (verified with jdk6, jdk7 and jdk8-b58) the behavior is:
loadFromXML throws UnsupportedEncodingException
storeToXML prints a warnings to System.err and silently stores the document in UTF-8.
- relates to
-
JDK-8000621 serializer.setEncoding emits warning message for unrecognized encoding, falls back to UTF-8
- Closed
-
JDK-8000354 (props) Properties.storeToXML/loadFromXML need to allow for alternative implementations
- Resolved
-
JDK-8004371 (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
- Closed