[GRASS-SVN] r40640 - grass/branches/releasebranch_6_4/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jan 25 00:49:26 EST 2010


Author: neteler
Date: 2010-01-25 00:49:24 -0500 (Mon, 25 Jan 2010)
New Revision: 40640

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/menuform.py
Log:
fix for trac #882 (successfully tested on XP and Linux)

Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/menuform.py	2010-01-25 03:22:16 UTC (rev 40639)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/menuform.py	2010-01-25 05:49:24 UTC (rev 40640)
@@ -1815,9 +1815,14 @@
         # parse the interface decription
         self.grass_task = grassTask()
         handler = processTask(self.grass_task)
-        xml.sax.parseString(getInterfaceDescription(cmd[0]),
+        enc = locale.getdefaultlocale()[1]
+        if enc and enc.lower() not in ("utf8", "utf-8"):
+            xml.sax.parseString(getInterfaceDescription(cmd[0]).decode(enc).split('\n',1)[1].replace('', '<?xml version="1.0" encoding="utf-8"?>\n', 1).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:



More information about the grass-commit mailing list