[GRASS-dev] [GRASS GIS] #1304: wx: map selection with LANG=C causes error

#1304: wx: map selection with LANG=C causes error
----------------------+-----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.5.0
Component: wxGUI | Version: svn-develbranch6
Keywords: | Platform: Linux
      Cpu: x86-64 |
----------------------+-----------------------------------------------------
(moved here from #1300)

when LANG=C you get this error when you go to pick a map from the wxGUI
drop-down list (e.g. in d.rast):

{{{
GSelect: invalid item: descriptor 'lower' requires a
'unicode' object but received a 'str'
}}}

with LANG=en_NZ.UTF-8 it works ok.

tested with latest 6.5svn.

thanks,
Hamish

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

#1304: wx: map selection with LANG=C causes error
----------------------+-----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.5.0
Component: wxGUI | Version: svn-develbranch6
Keywords: | Platform: Linux
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by hamish):

this bug is also present in trunk, but not 6.4.svn.

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

#1304: wx: map selection with LANG=C causes error
------------------------------+---------------------------------------------
Reporter: hamish | Owner: martinl
     Type: defect | Status: assigned
Priority: critical | Milestone: 6.5.0
Component: wxGUI | Version: svn-develbranch6
Keywords: sorting, unicode | Platform: Linux
      Cpu: x86-64 |
------------------------------+---------------------------------------------
Changes (by martinl):

* cc: grass-dev@… (added)
  * keywords: => sorting, unicode
  * status: new => assigned
  * owner: grass-dev@… => martinl

Comment:

The reason is case insensitive sorting items using unicode. In r45881
items are sorted in case sensitive mode which works for str/unicode. Now
sorting items in GSelect works similarly to `g.list` (case sensitive).

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

#1304: wx: map selection with LANG=C causes error
------------------------------+---------------------------------------------
Reporter: hamish | Owner: martinl
     Type: defect | Status: assigned
Priority: critical | Milestone: 6.5.0
Component: wxGUI | Version: svn-develbranch6
Keywords: sorting, unicode | Platform: Linux
      Cpu: x86-64 |
------------------------------+---------------------------------------------

Comment(by hamish):

Case insensitive sorting is more agreeable to me, but that's just personal
preference and if that's problematic it's not a big deal.

anyway, now it works again in 6.5svn, thanks.

a somewhat unrelated thing I notice: in the d.vect wxgui dialog the
symbols in the drop down list are sorted by type, but not alphabetically
within that type. seems to be same as 'd.vect --help' (and --xmd-desc I
suppose); raw filesystem order read with d.vect/main.c's icon_files() ->
readdir().

it would be nice to sort that list at the module level following the
g.list method.

Hamish

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

#1304: wx: map selection with LANG=C causes error
------------------------------+---------------------------------------------
Reporter: hamish | Owner: martinl
     Type: defect | Status: assigned
Priority: critical | Milestone: 6.5.0
Component: wxGUI | Version: svn-develbranch6
Keywords: sorting, unicode | Platform: Linux
      Cpu: x86-64 |
------------------------------+---------------------------------------------

Comment(by martinl):

Replying to [comment:3 hamish]:

> a somewhat unrelated thing I notice: in the d.vect wxgui dialog the
symbols in the drop down list are sorted by type, but not alphabetically
within that type. seems to be same as 'd.vect --help' (and --xmd-desc I
suppose); raw filesystem order read with d.vect/main.c's icon_files() ->
readdir().

try r48504 (trunk) or r48505 (devbr6)

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

#1304: wx: map selection with LANG=C causes error
------------------------------+---------------------------------------------
Reporter: hamish | Owner: martinl
     Type: defect | Status: assigned
Priority: critical | Milestone: 6.5.0
Component: wxGUI | Version: svn-develbranch6
Keywords: sorting, unicode | Platform: Linux
      Cpu: x86-64 |
------------------------------+---------------------------------------------

Comment(by martinl):

Anything remaining?

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

#1304: wx: map selection with LANG=C causes error
-----------------------+----------------------------------------------------
  Reporter: hamish | Owner: martinl
      Type: defect | Status: closed
  Priority: critical | Milestone: 6.5.0
Component: wxGUI | Version: svn-develbranch6
Resolution: fixed | Keywords: sorting, unicode
  Platform: Linux | Cpu: x86-64
-----------------------+----------------------------------------------------
Changes (by martinl):

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

Comment:

Replying to [comment:5 martinl]:
> Anything remaining?

Feel free to re-open if needed.

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