Opened 13 years ago

Closed 12 years ago

#1304 closed defect (fixed)

wx: map selection with LANG=C causes error

Reported by: hamish Owned by: martinl
Priority: critical Milestone: 6.5.0
Component: wxGUI Version: svn-develbranch6
Keywords: sorting, unicode Cc: grass-dev@…
CPU: x86-64 Platform: Linux

Description

(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

Change History (6)

comment:1 by hamish, 13 years ago

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

comment:2 by martinl, 13 years ago

Cc: grass-dev@… added
Keywords: sorting unicode added
Owner: changed from grass-dev@… to martinl
Status: newassigned

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).

comment:3 by hamish, 13 years ago

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

in reply to:  3 comment:4 by martinl, 13 years ago

Replying to 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)

comment:5 by martinl, 12 years ago

Anything remaining?

in reply to:  5 comment:6 by martinl, 12 years ago

Resolution: fixed
Status: assignedclosed

Replying to martinl:

Anything remaining?

Feel free to re-open if needed.

Note: See TracTickets for help on using tickets.