[GRASS-dev] [GRASS GIS] #2810: wxGUI modeler: encoding error when "save as..." from python editor

#2810: wxGUI modeler: encoding error when "save as..." from python editor
--------------------------------------------+-------------------------
Reporter: mlennert | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.3
Component: wxGUI | Version: svn-trunk
Keywords: modeler encoding python script | CPU: Unspecified
Platform: Unspecified |
--------------------------------------------+-------------------------
Working in a fr_BE.UTF-8 locale, I get the following error when I try to
save a python script using the "Save as..." button in the python editor
tab:

{{{
Traceback (most recent call last):
   File
"/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64
-unknown-linux-gnu/gui/wxpython/gmodeler/frame.py", line
1786, in OnSaveAs

self.SaveAs(force = False)
   File
"/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64
-unknown-linux-gnu/gui/wxpython/gmodeler/frame.py", line
1775, in SaveAs

fd.write(self.body.GetText())
UnicodeEncodeError
:
'ascii' codec can't encode character u'\xe8' in position
124: ordinal not in range(128)
}}}

I do not get this error when I use the 'Export to python script' button at
the top of the modeler window.

The encoding issue comes from the default model name and description which
are translated to French including accents.

This happens in trunk and in release70.

Moritz

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

#2810: wxGUI modeler: encoding error when "save as..." from python editor
--------------------------+--------------------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.7
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: modeler encoding python script
       CPU: Unspecified | Platform: Unspecified
--------------------------+--------------------------------------------

Comment (by martinl):

Still relevant?

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