Browse Source

wxGUI: don't encode if value is unicode

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@47172 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 13 years ago
parent
commit
8faf903567
1 changed files with 4 additions and 1 deletions
  1. 4 1
      gui/wxpython/gui_modules/dbm_base.py

+ 4 - 1
gui/wxpython/gui_modules/dbm_base.py

@@ -6,7 +6,7 @@
 List of classes:
  - VectorDBInfo
 
-(C) 2007-2010 by the GRASS Development Team
+(C) 2007-2011 by the GRASS Development Team
 
 This program is free software under the GNU General Public
 License (>=v2). Read the file COPYING that comes with GRASS
@@ -28,6 +28,9 @@ import grass.script as grass
 
 def unicodeValue(value):
     """!Encode value"""
+    if type(value) == types.UnicodeType:
+        return value
+    
     enc = UserSettings.Get(group = 'atm', key = 'encoding', subkey = 'value')
     if enc:
         value = unicode(value, enc)