I have an XML file with its encoding set within it: <?xml version="1.0" encoding="ISO-8859-15"?> but really file is encoded in UTF-8. Is there a way to override encoding declared in XML file when unmarshalling it with JAXB?
I have an XML file with its encoding set within it: <?xml version=1.0 encoding=ISO-8859-15?>
Share
You can unmarshal the content from a
java.io.Readerin order to supply the actual encoding:For More Information