Reading an ISO-8859-15 encoded XML I get an UTF8 encoder that fails.
Debugging, I found AbstractJAXBProvider.processWithSecureProcessing:281 sets UTF8 by default if charset is null:
https://github.com/resteasy/Resteasy/blob/main/providers/jaxb/src/main/java/org/jboss/resteasy/plugins/providers/jaxb/AbstractJAXBProvider.java
By doing so, in XMLDocumentFragmentScannerImpl.scanXMLDeclOrTextDecl of apache Xerces
this.fEntityScanner.getCurrentEntity().isEncodingExternallySpecified() evaluates to true, and setEncoding is not called, letting UTF-8 be the wrong encoding and failing.
If I just reset encoding to null it works perfectly.