[josm-dev] presets file with byte order mark exception

Igor Brejc igor.brejc at gmail.com
Sat Oct 27 19:11:40 BST 2007


When I start JOSM with my custom preset file which is in UTF-8 and has 
the byte order mark (http://unicode.org/faq/utf_bom.html#BOM), I get the 
following exception:

org.xml.sax.SAXParseException: Content is not allowed in prolog.
        at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAX
ParseException(Unknown Source)
        at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalErro
r(Unknown Source)
        at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(
Unknown Source)
        at 
com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(U
nknown Source)
        at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$Prolog
Driver.next(Unknown Source)
        at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(U
nknown Source)
        at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l.scanDocument(Unknown Source)
        at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(U
nknown Source)
        at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(U
nknown Source)
        at 
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown So
urce)
        at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Un
known Source)
        at 
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.p
arse(Unknown Source)
        at javax.xml.parsers.SAXParser.parse(Unknown Source)
        at 
org.openstreetmap.josm.tools.XmlObjectParser$1.run(XmlObjectParser.ja
va:173)

If I save it without the BOM, it works fine.

Regards,
Igor




More information about the josm-dev mailing list