The error message i got before adding the encoding:
java.io.IOException: javax.xml.stream.XMLStreamException: Underlying stream encoding 'Cp1252' and input paramter for writeStartDocument() method 'UTF-8' do not match.
at io.jenetics.jpx.GPX.write(GPX.java:1085)
at io.jenetics.jpx.GPX.write(GPX.java:1021)
at io.jenetics.jpx.GPX.write(GPX.java:1039)
at io.jenetics.jpx.GPX.write(GPX.java:1053)
at org.sonnenwagen.spark.gps.GPXhandler.updateOrSetNewWayPoint(GPXhandler.java:56)
at org.sonnenwagen.spark.gps.GPXhandler.main(GPXhandler.java:31)
Caused by: javax.xml.stream.XMLStreamException: Underlying stream encoding 'Cp1252' and input paramter for writeStartDocument() method 'UTF-8' do not match.
at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeStartDocument(Unknown Source)
at io.jenetics.jpx.GPX.write(GPX.java:1081)
... 5 more
Hello,
when trying to write a GPX file I get an error.
I found a fix to simply add the encoding "UTF-8" when creating the XMLStreamWriter in the GPX.java class, starting from line 1075:
The error message i got before adding the encoding:
Best regards