瀏覽代碼

wxGUI: fix Windows locale problem
(merge https://trac.osgeo.org/grass/changeset/41308 from relbr64)


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

Martin Landa 15 年之前
父節點
當前提交
75d5a2d824
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      gui/wxpython/gui_modules/gcmd.py

+ 2 - 1
gui/wxpython/gui_modules/gcmd.py

@@ -35,6 +35,7 @@ import sys
 import time
 import errno
 import signal
+import locale
 
 import wx
 
@@ -441,7 +442,7 @@ class Command:
 
         for type, msg in self.__ProcessStdErr():
             if type == 'ERROR':
-                return unicode(msg, "utf-8")
+                return unicode(msg, locale.getdefaultlocale()[1])
 
         return ''