Opened 14 years ago
Last modified 13 years ago
#2789 new bug
Encoding problem with OSM plugin
Reported by: | cdavilam | Owned by: | wonder |
---|---|---|---|
Priority: | major: does not work as expected | Milestone: | Version 1.7.0 |
Component: | Python plugins and bindings | Version: | Trunk |
Keywords: | Encoding, OSM | Cc: | cdavilam@… |
Must Fix for Release: | No | Platform: | Debian |
Platform Version: | testing | Awaiting user input: | no |
Description
If you edit OSM data (downloaded or from a saved *.osm file) that contain accented characters, ñ or similar, you get the following error:
process failed. OpenStreetMap server response: Bad Request - Cannot parse valid way from xml string <?xml version="1.0" encoding="UTF-8"?><osm version="0.6" generator="OpenStreetMap server"><way id="23108300" visible="true" timestamp="2010-04-05T10:50:23Z" user="antecessor" version="10" changeset="4919909"><nd ref="248219762"/><nd ref="248219763"/><nd ref="248219764"/><nd ref="248219765"/><nd ref="248219766"/><nd ref="248219767"/><nd ref="248219768"/><nd ref="248219769"/><nd ref="248219770"/><nd ref="248219771"/><nd ref="412472837"/><nd ref="248219772"/><nd ref="248219773"/><nd ref="412472711"/><nd ref="447083532"/><nd ref="685164049"/><nd ref="447083436"/><nd ref="685164046"/><nd ref="248219776"/><nd ref="248219777"/><nd ref="248219778"/><nd ref="248219779"/><tag k="highway" v="primary"/><tag k="lanes" v="2"/><tag k="name" v="Carretera de Cáceres a Villanueva de la Serena"/><tag k="oneway" v="no"/><tag k="ref" v="EX-206"/><tag k="source" v="survey"/><tag k="surface" v="asphalt"/></way></osm>. Fatal error: Input is not proper UTF-8, indicate encoding !.
Data used to reproduce the error can be downloaded with the following bbox: Lat from 39.44089 to 39.45034, Lot from -6.35628 to -6.34617
If you select way with ID 23108300 (primary highway, ref EX-206), way name is displayed correctly (Carretera de Cáceres...) but relation name not (Carretera de Cáceres...). Another member of the same relation can be edited without problems using JOSM.
Change History (4)
comment:1 by , 14 years ago
Owner: | changed from | to
---|
comment:2 by , 14 years ago
comment:3 by , 14 years ago
Milestone: | Version 1.5.0 → Version 1.6.0 |
---|
comment:4 by , 13 years ago
Must Fix for Release: | Yes → No |
---|
Great tools for detecting encoding and handling invalid chars (even if proper encoding) are:
http://chardet.feedparser.org/
http://pypi.python.org/pypi/Unidecode/0.04.1