فهرست منبع

Attempt to fix trac https://trac.osgeo.org/grass/ticket/552 (add vector map layer in layer manager doesn't show any paramter window)
(merge from relber64, https://trac.osgeo.org/grass/changeset/36789)


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@36791 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 16 سال پیش
والد
کامیت
46df02ee9c
1فایلهای تغییر یافته به همراه9 افزوده شده و 2 حذف شده
  1. 9 2
      gui/wxpython/gui_modules/menuform.py

+ 9 - 2
gui/wxpython/gui_modules/menuform.py

@@ -53,6 +53,7 @@ import textwrap
 import os
 import time
 import copy
+import locale
 
 ### i18N
 import gettext
@@ -1729,8 +1730,14 @@ class GUI:
         # parse the interface decription
         self.grass_task = grassTask()
         handler = processTask(self.grass_task)
-        xml.sax.parseString( getInterfaceDescription(cmd[0]), handler )
-
+        enc = locale.getdefaultlocale()[1]
+        if enc and enc.lower() not in ("utf8", "utf-8"):
+            xml.sax.parseString(getInterfaceDescription(cmd[0]).decode(enc).encode("utf-8"),
+                                handler)
+        else:
+            xml.sax.parseString(getInterfaceDescription(cmd[0]),
+                                handler)
+        
         # if layer parameters previously set, re-insert them into dialog
         if completed is not None:
             if 'params' in dcmd_params: