does not read and split XML like the following with the correct encoding:
The root cause is due to the spec of IOConverter.toInputStream(File, String):
which was clarified at
CAMEL-8346 and CAMEL-8356.
This method converts a File with a charset to an InputStream with the JVM default charset encoding whatever the format of the file is. However, in turn XmlConverter.toDOMDocument(...) uses DocumentBuilder to convert the input stream to a DOM Document and DocumentBuilder is aware of the XML declaration:
to detect the file encoding, and there is a mismatch between the actual encoding of the input stream (JVM default) and the encoding declared in XML.