[GRASS-SVN] r45572 - grass/branches/releasebranch_6_4/lib/python
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Mar 5 11:08:44 EST 2011
Author: martinl
Date: 2011-03-05 08:08:44 -0800 (Sat, 05 Mar 2011)
New Revision: 45572
Modified:
grass/branches/releasebranch_6_4/lib/python/core.py
Log:
#1295 (Wx location wizard fails to create location if it's title
contains non-latin letters) - write MYNAME using encoding utf-8
(merge r45550 from trunk)
Modified: grass/branches/releasebranch_6_4/lib/python/core.py
===================================================================
--- grass/branches/releasebranch_6_4/lib/python/core.py 2011-03-05 16:02:13 UTC (rev 45571)
+++ grass/branches/releasebranch_6_4/lib/python/core.py 2011-03-05 16:08:44 UTC (rev 45572)
@@ -30,6 +30,7 @@
import atexit
import subprocess
import shutil
+import codecs
# i18N
import gettext
@@ -1009,8 +1010,9 @@
raise ScriptException(repr(error))
try:
- fd = open(os.path.join(dbase, location,
- 'PERMANENT', 'MYNAME'), 'w')
+ fd = codecs.open(os.path.join(dbase, location,
+ 'PERMANENT', 'MYNAME'),
+ encoding = 'utf-8', mode = 'w')
if desc:
fd.write(desc + os.linesep)
else:
More information about the grass-commit
mailing list