Details
-
Type:
Bug
-
Status: Resolved
-
Priority:
Trivial
-
Resolution: Fixed
-
Affects Version/s: 2.17.2
-
Component/s: camel-core
-
Labels:None
-
Estimated Complexity:Unknown
-
Regression:Regression
Description
If a type conversion is performed between XMLStreamReader and the platform default encoding is not UTF-8 and the used Stax parser is the one from the JDK the conversion will fail.
The error message will look like that:
Caused by: javax.xml.stream.XMLStreamException: Underlying stream encoding 'ASCII' and input paramter for writeStartDocument() method 'utf-8' do not match.
The underlying issue was introduced with CAMEL-10070 and CAMEL-10080.
Unfortunately this cannot be unit tested, as in the unit tests the default platform encoding is UTF-8 and the used Stax parser is woodstox. Both conditions prevent the issue from occuring.