[GRASS-SVN] r67607 - grass/trunk/lib/init
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jan 18 19:19:32 PST 2016
Author: annakrat
Date: 2016-01-18 19:19:32 -0800 (Mon, 18 Jan 2016)
New Revision: 67607
Modified:
grass/trunk/lib/init/grass.py
Log:
grass.py: fallback to UTF8 if no default encoding found - #2869
Modified: grass/trunk/lib/init/grass.py
===================================================================
--- grass/trunk/lib/init/grass.py 2016-01-19 03:09:30 UTC (rev 67606)
+++ grass/trunk/lib/init/grass.py 2016-01-19 03:19:32 UTC (rev 67607)
@@ -52,6 +52,9 @@
# ----+- Python 3 compatibility start -+----
PY2 = sys.version[0] == '2'
ENCODING = locale.getdefaultlocale()[1]
+if ENCODING is None:
+ ENCODING = 'UTF-8'
+ print("Default locale not found, using UTF-8") # intentionally not translatable
def to_text_string(obj, encoding=ENCODING):
More information about the grass-commit
mailing list