TD seems to export OPTs with BOM that migth break some parsers

Description

I have generated a couple OPTs that have byte order mark, on Java it fails parsing those XMLs:

Content is not allowed in prolog.. Stacktrace follows:
Message: Content is not allowed in prolog.

org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
at org.apache.xerces.jaxp.validation.Util.toSAXParseException(Unknown Source)
at org.apache.xerces.jaxp.validation.StreamValidatorHelper.validate(Unknown Source)
at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)
at javax.xml.validation.Validator.validate(Validator.java:124)
at javax.xml.validation.Validator$validate.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)

Removing the BOM fixes the problem. Or something like this should be used: https://github.com/gpakosz/UnicodeBOMInputStream

Is the BOM needed by the TD? (I've read the BOM is optional for UTF-8)

Activity

Show:

Pablo Pazos March 25, 2020 at 2:31 PM

If it wasn’t fixed, it should be an active issue, I don’t know about the changes made to the TD

Heath Frankel March 23, 2020 at 7:44 AM
Edited

Pablo is this still an issue?

Unresolved

Details

Assignee

Reporter

Components

Priority

Created May 26, 2015 at 3:21 AM
Updated March 25, 2020 at 2:31 PM