Opened 8 years ago

Closed 8 years ago

#2835 closed defect (fixed)

wxgui: encoding error in manually entered rules

Reported by: mlennert Owned by: grass-dev@…
Priority: normal Milestone: 7.0.3
Component: wxGUI Version: svn-releasebranch70
Keywords: manual rules Cc:
CPU: Unspecified Platform: Unspecified

Description

  • Launch r.category/r.colors/r.recode/r.reclass (and probably others) module GUI (even from the terminal)
  • Type any character into the text widget for typing rules manually ('Define' tab in most of the above examples)

Result:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-
packages/wx-3.0-gtk2/wx/lib/filebrowsebutton.py", line 140,
in OnChanged

self.changeCallback(evt)
  File "/usr/lib/grass70/gui/wxpython/gui_core/forms.py",
line 2185, in OnSetValue

self.OnUpdateValues(event)
  File "/usr/lib/grass70/gui/wxpython/gui_core/forms.py",
line 628, in updateValuesHook

self.SetStatusText(' '.join(map(gcmd.DecodeString,
self.notebookpanel.createCmd(ignoreErrors = True))))
  File "/usr/lib/grass70/gui/wxpython/core/gcmd.py", line
85, in DecodeString

return string.decode(_enc)
  File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in
decode

return codecs.utf_8_decode(input, errors, True)
UnicodeEncodeError
:
'ascii' codec can't encode character u'\xe9' in position 25:
ordinal not in range(128)

My locale:

> locale
LANG=fr_BE
LANGUAGE=fr_BE
LC_CTYPE=fr_BE.UTF-8
LC_NUMERIC=C
LC_TIME=fr_BE.UTF-8
LC_COLLATE=fr_BE.UTF-8
LC_MONETARY=fr_BE.UTF-8
LC_MESSAGES=fr_BE.UTF-8
LC_PAPER=fr_BE.UTF-8
LC_NAME=fr_BE.UTF-8
LC_ADDRESS=fr_BE.UTF-8
LC_TELEPHONE=fr_BE.UTF-8
LC_MEASUREMENT=fr_BE.UTF-8
LC_IDENTIFICATION=fr_BE.UTF-8
LC_ALL=

Valid for release70 and trunk.

Change History (3)

comment:1 by annakrat, 8 years ago

Try r67334.

in reply to:  1 comment:2 by mlennert, 8 years ago

Replying to annakrat:

Try r67334.

Works great. Thanks !

comment:3 by annakrat, 8 years ago

Resolution: fixed
Status: newclosed

Backported in r67347.

Note: See TracTickets for help on using tickets.