Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#3126 closed defect (fixed)

d.vect: Accents in legend_label cause encoding error

Reported by: mlennert Owned by: grass-dev@…
Priority: normal Milestone: 7.2.0
Component: Display Version: svn-trunk
Keywords: d.vect legend label encoding Cc:
CPU: Unspecified Platform: Unspecified

Description

I don't know why I didn't see this before, but I now get an error when using accents in the legend_label

d.vect map=myhospitals@user1 type=point,line,boundary,area,face fill_color=red width=1 legend_label="Les hôpitaux"
Traceback (most recent call last):
  File "/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-
linux-gnu/gui/wxpython/gui_core/forms.py", line 798, in
OnApply

self)
  File "/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-
linux-gnu/gui/wxpython/lmgr/layertree.py", line 1977, in
GetOptData

self.ChangeLayer(layer)
  File "/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-
linux-gnu/gui/wxpython/lmgr/layertree.py", line 2106, in
ChangeLayer

self.Map.SetLayers(self.GetVisibleLayers())
  File "/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-
linux-gnu/gui/wxpython/core/render.py", line 1315, in
SetLayers

Debug.msg(5, "Map.SetLayers(): layers=%s" % (layers))
UnicodeEncodeError
:
'ascii' codec can't encode character u'\xf4' in position 47:
ordinal not in range(128)

Change History (5)

comment:1 Changed 3 years ago by annakrat

Try r69116.

comment:2 in reply to:  1 Changed 3 years ago by mlennert

Replying to annakrat:

Try r69116.

Seems to solve the issue, thanks !

I'll just leave open for now to test with some more special characters when I have the time.

Moritz

comment:3 Changed 3 years ago by annakrat

Backported in r69176 to 7.2. I suggest to close this.

comment:4 Changed 3 years ago by mlennert

Resolution: fixed
Status: newclosed

comment:5 Changed 3 years ago by annakrat

Milestone: 7.0.57.2.0
Note: See TracTickets for help on using tickets.