Opened 16 years ago

Closed 15 years ago

Last modified 15 years ago

#1048 closed bug (fixed)

Mapserver export writes file in wrong encoding

Reported by: lubaby Owned by: nobody
Priority: major: does not work as expected Milestone:
Component: MapServer export Version: Trunk
Keywords: Cc:
Must Fix for Release: No Platform: All
Platform Version: Awaiting user input: no

Description

Not all character strings in files .map exported by Mapserver are in UTF-8 enocoding. Strings in LAYER object are exported correctly but non-Latin1 characters used in WEB object and in heading of document ("NAME" of MAP object) are replaced by "?".

Change History (3)

comment:1 by pcav, 15 years ago

The plugin has been replaced by a new one, written in python. However, essentially the same problem seems to occur, as I get an error when trying to export a project with a high ascii in layer neme (città): An error has occured while executing Python code:

Traceback (most recent call last):

File "/usr/share/qgis/python/plugins/mapserver_export/mapserverexport.py", line 94, in run

result = exporter.writeMapFile()

File "/usr/share/qgis/python/plugins/mapserver_export/ms_export.py", line 103, in writeMapFile

self.writeMapLayers()

File "/usr/share/qgis/python/plugins/mapserver_export/ms_export.py", line 380, in writeMapLayers

layer_def += self.simpleRenderer(lyr, symbolNode)

File "/usr/share/qgis/python/plugins/mapserver_export/ms_export.py", line 420, in simpleRenderer

class_def += " OUTLINECOLOR " + outlineNode.getAttribute('red') + ' ' + outlineNode.getAttribute('green') + ' ' + outlineNode.getAttribute('blue') + "\n"

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 27: ordinal not in range(128)

comment:2 by wonder, 15 years ago

Resolution: fixed
Status: newclosed

Fixed in r9983 (trunk) and r9984 (1.0 branch)

comment:3 by (none), 15 years ago

Milestone: Version 1.0.1

Milestone Version 1.0.1 deleted

Note: See TracTickets for help on using tickets.