[GRASS-dev] [GRASS GIS] #3423: UnicodeDecodeError in r.category in wxGUI when category labels contain special characters

GRASS GIS trac at osgeo.org
Sun Nov 12 09:45:24 PST 2017


#3423: UnicodeDecodeError in r.category in wxGUI when category labels contain
special characters
--------------------------+---------------------------------
  Reporter:  mlennert     |      Owner:  grass-dev@…
      Type:  defect       |     Status:  new
  Priority:  normal       |  Milestone:  7.4.0
 Component:  wxGUI        |    Version:  svn-trunk
Resolution:               |   Keywords:  r.category encoding
       CPU:  Unspecified  |   Platform:  Unspecified
--------------------------+---------------------------------

Comment (by mlennert):

 Replying to [comment:4 marisn]:
 > Replying to [comment:3 mlennert]:
 > > So the question becomes: should choice of the language in which the
 GUI appears influence the locale settings in this manner ? If you say yes,
 than we can close this.
 >
 > Yes, it should. There are messages also provided by non-GUI apps or GUI
 apps can be started from CLI thus bypassing wxgui language switching
 mechanisms.

 So, the GUI language should influence all the rest (which it doesn't by
 the way, since r.category works like a charm with special characters on
 the command line even when the GUI is set to 'en', i.e. to locale=C).
 Personally, I would prefer to be able to choose to show the GUI in another
 language without loosing half of the attribute info...

 One related question is why 'en' should lead to locale=C. We could have
 the GUI in en_EN.UTF-8 or something like that.

 >
 > Here is a test case triggering a failure without switching GUI language
 (NC basic; sorry for my Russian):

 When you say 'without switching GUI language', do you mean that the GUI is
 set to Russian ?

 >
 > {{{
 > g.copy rast=landuse,landuse
 > r.category map=landuse separator=":" rules=- << EOF
 > 1:развитая
 > 2:сельское хозяйство
 > 3:травянистый
 > 4:кустарниковые
 > 5:лесной
 > 6:водный
 > 7:осадок
 > EOF
 > r.category map=landuse
 > }}}

 I do not have any failure here, with the GUI language set to 'system'
 which is


 {{{
 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=
 }}}

 However, when I switch the GUI language to 'en', I get:

 {{{
 r.category map=landuse at user1
 (Sun Nov 12 18:44:33 2017) Command finished (0 sec)
 }}}

 i.e. nothing...

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3423#comment:5>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list