[GRASS-dev] [GRASS GIS] #1681: WXGUI vector editing fails with python unicode error
GRASS GIS
trac at osgeo.org
Fri Jun 29 04:30:43 PDT 2012
#1681: WXGUI vector editing fails with python unicode error
-------------------------+--------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: | Platform: Linux
Cpu: Unspecified |
-------------------------+--------------------------------------------------
Steps to reproduce:
* Create a new GRASS vector data set;
* In "Attribute table" dialog choose "Manage table" and add a single text
attribute;
* Rightclick layer and choose "Start editing";
* Add a feature and fill text field with: "āšņļ";
* Click "Submit" and observe infamous unicode error in WXGUI console.
{{{
Traceback (most recent call last):
File "/home/maris/soft/grass_trunk/dist.x86_64-unknown-
linux-gnu/etc/gui/wxpython/dbmgr/dialogs.py", line 318, in
OnSubmit
for sql in self.GetSQLString(updateValues = True):
File "/home/maris/soft/grass_trunk/dist.x86_64-unknown-
linux-gnu/etc/gui/wxpython/dbmgr/dialogs.py", line 241, in
GetSQLString
updatedValues.append("'" + str(newvalue) + "'")
UnicodeEncodeError
:
'ascii' codec can't encode characters in position 3-4:
ordinal not in range(128)
}}}
"Data browser" encoding is set to "utf-8"
{{{
GRASS 7.0.svn (Igaunija):~/soft/grass_trunk > locale
LANG=lv_LV
LC_CTYPE="lv_LV.utf8"
LC_NUMERIC="lv_LV.utf8"
LC_TIME="lv_LV.utf8"
LC_COLLATE="lv_LV.utf8"
LC_MONETARY="lv_LV.utf8"
LC_MESSAGES="lv_LV.utf8"
LC_PAPER="lv_LV.utf8"
LC_NAME="lv_LV.utf8"
LC_ADDRESS="lv_LV.utf8"
LC_TELEPHONE="lv_LV.utf8"
LC_MEASUREMENT="lv_LV.utf8"
LC_IDENTIFICATION="lv_LV.utf8"
LC_ALL=lv_LV.utf8
}}}
Notice to all developers - if You do anything user visible or provided
text related, keep "āšņļ" and "йцукен" at Your hand all the time, please.
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1681>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list