[GRASS-SVN] r54250 - grass/trunk/gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Dec 8 05:54:41 PST 2012


Author: martinl
Date: 2012-12-08 05:54:41 -0800 (Sat, 08 Dec 2012)
New Revision: 54250

Modified:
   grass/trunk/gui/wxpython/gui_core/goutput.py
Log:
wxGUI: call unicode() with `errors=replace' (avoid failure)


Modified: grass/trunk/gui/wxpython/gui_core/goutput.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/goutput.py	2012-12-08 13:29:01 UTC (rev 54249)
+++ grass/trunk/gui/wxpython/gui_core/goutput.py	2012-12-08 13:54:41 UTC (rev 54250)
@@ -631,9 +631,9 @@
             except UnicodeDecodeError:
                 enc = UserSettings.Get(group = 'atm', key = 'encoding', subkey = 'value')
                 if enc:
-                    txt = unicode(txt, enc)
+                    txt = unicode(txt, enc, errors = 'replace')
                 elif 'GRASS_DB_ENCODING' in os.environ:
-                    txt = unicode(txt, os.environ['GRASS_DB_ENCODING'])
+                    txt = unicode(txt, os.environ['GRASS_DB_ENCODING'], errors = 'replace')
                 else:
                     txt = EncodeString(txt)
                 



More information about the grass-commit mailing list