Opened 16 years ago
Closed 16 years ago
#1772 closed defect (fixed)
[PATCH] GPX files written by JOSM have wrong encoding
Reported by: | anonymous | Owned by: | framm |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Core | Version: | latest |
Keywords: | Cc: |
Description
I came across this as gpsbabel choked on a a gpx file exported by JOSM.
The xml header says encoding='UTF-8' but the data actually is ISO 8859-1, e.g in "<name>Dorfstraße</name>".
So encoding should either contain the real encoding or more desirable the file should encoded in UTF-8.
Tested with JOSM 1081 on Windows.
Attachments (1)
Change History (5)
comment:1 by , 16 years ago
Summary: | GPX files written by JOSM have wrong encoding → [PATCH] GPX files written by JOSM have wrong encoding |
---|
by , 16 years ago
Attachment: | GPX_UTF8_patch.txt added |
---|
comment:2 by , 16 years ago
I've played a bit with the source and changed GpxWriter to be used like OsmWriter. That needs much more code to be touched but at least if OsmWriter is considered a good implementation the result might be desirable.
comment:3 by , 16 years ago
Sorry, I can't attach the patch because it always gets rejected as potential spam. That's not nice.
The GpxWriter class uses an PrintWriter instance which uses the default encoding. On Windows the default encoding is not UTF-8 therefore the encoding problem.
The attached patch corrects this.