We're updating the issue view to help you get more done. 

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)

Status

Assignee

Peter Gummer

Reporter

Pablo Pazos

Labels

Components

Priority

Major