[GRASS-dev] [GRASS GIS] #3340: wxGUI: encoding error when saving a workspace with vector that has accents in legend_label

GRASS GIS trac at osgeo.org
Fri Apr 28 05:36:23 PDT 2017


#3340: wxGUI: encoding error when saving a workspace with vector that has accents
in legend_label
------------------------------------+-------------------------
 Reporter:  mlennert                |      Owner:  grass-dev@…
     Type:  defect                  |     Status:  new
 Priority:  normal                  |  Milestone:  7.2.1
Component:  wxGUI                   |    Version:  svn-trunk
 Keywords:  legend_label workspace  |        CPU:  Unspecified
 Platform:  Unspecified             |
------------------------------------+-------------------------
 Whenever I have a vector map with a legend_label with accents, such as:

 {{{
 d.vect map=roadsmajor at PERMANENT type=point,line,boundary,area,face width=1
 legend_label=Chaussées
 }}}

 I cannot save the workspace file because of an encoding error:

 {{{
 Échec d'écriture des paramètres de l'espace de travail courant.

 Raison: 'ascii' codec can't encode character u'\xe9' in position 33:
 ordinal not in range(128)

 Traceback (most recent call last):
   File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
 gnu/gui/wxpython/lmgr/frame.py", line 1649, in SaveToWorkspaceFile
     WriteWorkspaceFile(lmgr=self, file=tmpfile)
   File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
 gnu/gui/wxpython/core/workspace.py", line 900, in __init__
     self.__writeLayer(mapTree, item)
   File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
 gnu/gui/wxpython/core/workspace.py", line 993, in __writeLayer
     (' ' * self.indent, self.__filterValue(val)))
 UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in
 position 33: ordinal not in range(128)
 }}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3340>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list