Bug #5718

OpenStreetMap plugin corrupts Unicode characters when uploading to the server

Added by Leyan Ouyang 12 months ago. Updated 2 months ago.

Status:Closed Start Date:06/02/2012
Priority:Normal Due date:
Assigned to:Martin Dobias % Done:

0%

Category:Python plugins and bindings
Target version:Version 2.0.0
Platform: Patch supplied:Yes
Platform version: Affected version:master
Status info: Causes crash or corruption:No
Resolution:invalid

Description

I used the OpenStreetMap plugin to change some streets name in China. I was able to type the characters without issues and upload the data, but when I went to check on the website, the result was only lines of "???" : http://www.openstreetmap.org/browse/changeset/11776889

After investigation, it is caused by the conversion of the prepared XML diff to ASCII before sending it, in python/plugins/osm/OsmUploadDlg.py:
requestBytes = requestXml.toAscii()
httpSessionId = self.http.request(header, requestBytes)

This is done for each of the 9 different processes.

I just tried with a toUtf8() and it seemed to work (http://www.openstreetmap.org/browse/changeset/11777700, you can see the "created_by = QGIS OSM v0.5" and the correct name of the street modified), but I am no expert in this. Everything before this last step seems to be prepared for utf8, so is there any special reason to convert to ASCII before sending ?

I think it is high priority as right now it is sending corrupted data silently to the OpenStreetMap server.

History

Updated by Marco Hugentobler 11 months ago

  • Patch supplied changed from No to Yes

Updated by Marco Hugentobler 11 months ago

  • Assigned to set to Martin Dobias

Updated by Paolo Cavallini 9 months ago

  • Target version set to Version 2.0.0

Updated by Giovanni Manghi 5 months ago

  • Priority changed from High to Normal

Updated by Alexander Bruy 2 months ago

  • Status changed from New to Closed
  • Resolution set to invalid

Seems this can be closed, because OSM plugin removed from master

Also available in: Atom PDF