[GRASS-SVN] r54245 - grass/trunk/gui/wxpython/dbmgr

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Dec 7 16:08:37 PST 2012


Author: martinl
Date: 2012-12-07 16:08:36 -0800 (Fri, 07 Dec 2012)
New Revision: 54245

Modified:
   grass/trunk/gui/wxpython/dbmgr/vinfo.py
Log:
wxGUI/dbmgr: don't fail on unknown encoding


Modified: grass/trunk/gui/wxpython/dbmgr/vinfo.py
===================================================================
--- grass/trunk/gui/wxpython/dbmgr/vinfo.py	2012-12-07 23:54:42 UTC (rev 54244)
+++ grass/trunk/gui/wxpython/dbmgr/vinfo.py	2012-12-08 00:08:36 UTC (rev 54245)
@@ -32,9 +32,15 @@
     
     enc = UserSettings.Get(group = 'atm', key = 'encoding', subkey = 'value')
     if enc:
-        value = unicode(value, enc)
+        try:
+            value = unicode(value, enc)
+        except LookupError, e:
+            value = e
     elif 'GRASS_DB_ENCODING' in os.environ:
-        value = unicode(value, os.environ['GRASS_DB_ENCODING'])
+        try:
+            value = unicode(value, os.environ['GRASS_DB_ENCODING'])
+        except LookupError, e:
+            value = e
     else:
         try:
             value = unicode(value, 'ascii')



More information about the grass-commit mailing list