[GRASS-dev] [GRASS GIS] #3126: d.vect: Accents in legend_label cause encoding error

#3126: d.vect: Accents in legend_label cause encoding error
------------------------------------------+-------------------------
Reporter: mlennert | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.5
Component: Display | Version: svn-trunk
Keywords: d.vect legend label encoding | CPU: Unspecified
Platform: Unspecified |
------------------------------------------+-------------------------
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)
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3126&gt;
GRASS GIS <https://grass.osgeo.org>

#3126: d.vect: Accents in legend_label cause encoding error
--------------------------+------------------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.5
Component: Display | Version: svn-trunk
Resolution: | Keywords: d.vect legend label encoding
       CPU: Unspecified | Platform: Unspecified
--------------------------+------------------------------------------

Comment (by annakrat):

Try r69116.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3126#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#3126: d.vect: Accents in legend_label cause encoding error
--------------------------+------------------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.5
Component: Display | Version: svn-trunk
Resolution: | Keywords: d.vect legend label encoding
       CPU: Unspecified | Platform: Unspecified
--------------------------+------------------------------------------

Comment (by mlennert):

Replying to [comment:1 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

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3126#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>

#3126: d.vect: Accents in legend_label cause encoding error
--------------------------+------------------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.5
Component: Display | Version: svn-trunk
Resolution: | Keywords: d.vect legend label encoding
       CPU: Unspecified | Platform: Unspecified
--------------------------+------------------------------------------

Comment (by annakrat):

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

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/3126#comment:3&gt;
GRASS GIS <https://grass.osgeo.org>

#3126: d.vect: Accents in legend_label cause encoding error
--------------------------+------------------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.0.5
Component: Display | Version: svn-trunk
Resolution: fixed | Keywords: d.vect legend label encoding
       CPU: Unspecified | Platform: Unspecified
--------------------------+------------------------------------------
Changes (by mlennert):

* status: new => closed
* resolution: => fixed

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/3126#comment:4&gt;
GRASS GIS <https://grass.osgeo.org>

#3126: d.vect: Accents in legend_label cause encoding error
--------------------------+------------------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.2.0
Component: Display | Version: svn-trunk
Resolution: fixed | Keywords: d.vect legend label encoding
       CPU: Unspecified | Platform: Unspecified
--------------------------+------------------------------------------
Changes (by annakrat):

* milestone: 7.0.5 => 7.2.0

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3126#comment:5&gt;
GRASS GIS <https://grass.osgeo.org>