Details
Description
DOMUtil and prism parser classes (and probably others) silently expect UTF-8 everywhere. This fails when -Dfile.encoding option is set to something else. For example Intellij idea on windows usesĀ -Dfile.encoding=windows-1250. Then we're getting errors like :
Caused by: org.apache.xerces.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.Caused by: org.apache.xerces.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence. at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) at javax.xml.parsers.DocumentBuilder.parse(Unknown Source) at com.evolveum.midpoint.util.DOMUtil.parse(DOMUtil.java:271)
All methods that take just InputStream parameter should also have Charset parameter at least optional. Currently there's no way of parsing file that is utf8 without bom on windows when it goes through parser/domutils internally.
Attachments
Issue Links
- have ancestors
-
MID-6699 MP Studio differ
-
- Closed
-