浏览代码

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 年之前
父节点
当前提交
8faf903567
共有 1 个文件被更改,包括 4 次插入1 次删除
  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)