[GRASS-SVN] r54857 - grass/branches/releasebranch_6_4/gui/wxpython/dbmgr
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Feb 3 02:03:42 PST 2013
Author: martinl
Date: 2013-02-03 02:03:42 -0800 (Sun, 03 Feb 2013)
New Revision: 54857
Modified:
grass/branches/releasebranch_6_4/gui/wxpython/dbmgr/vinfo.py
Log:
wxGUI/dbmgr: update unicodeValue() - fix recoding issue
Modified: grass/branches/releasebranch_6_4/gui/wxpython/dbmgr/vinfo.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/dbmgr/vinfo.py 2013-02-03 10:00:22 UTC (rev 54856)
+++ grass/branches/releasebranch_6_4/gui/wxpython/dbmgr/vinfo.py 2013-02-03 10:03:42 UTC (rev 54857)
@@ -31,17 +31,12 @@
return value
enc = UserSettings.Get(group = 'atm', key = 'encoding', subkey = 'value')
- if enc:
- value = unicode(value, enc)
- elif 'GRASS_DB_ENCODING' in os.environ:
- value = unicode(value, os.environ['GRASS_DB_ENCODING'])
+ if not enc and 'GRASS_DB_ENCODING' in os.environ:
+ enc = os.environ['GRASS_DB_ENCODING']
else:
- try:
- value = unicode(value, 'ascii')
- except UnicodeDecodeError:
- value = _("Unable to decode value. Set encoding in GUI preferences ('Attributes').")
+ enc = 'utf-8'
- return value
+ return unicode(value, enc, errors = 'replace')
def createDbInfoDesc(panel, mapDBInfo, layer):
"""!Create database connection information content"""
More information about the grass-commit
mailing list