#3838: r74307 breaks GUI: UnicodeDecodeError --------------------------+------------------------- Reporter: marisn | Owner: grass-dev@… Type: defect | Status: new Priority: normal | Milestone: Component: wxGUI | Version: svn-trunk Resolution: | Keywords: CPU: Unspecified | Platform: Linux --------------------------+-------------------------
Comment (by pmav99): Dear Maris Could you please try the following patch: {{{ index 1183e93b..0bd515b2 100644 --- lib/python/__init__.py +++ lib/python/__init__.py @@ -1,6 +1,8 @@ import gettext import os +import six + # Setup i18N # # Calling `gettext.install()` injects `_()` in the builtins namespace and @@ -17,9 +19,14 @@ import os # - https://www.wefearchange.org/2012/06/the-right-way-to- internationalize-your.html # _LOCALE_DIR = os.path.join(os.getenv("GISBASE"), 'locale') -gettext.install('grasslibs', _LOCALE_DIR) -gettext.install('grassmods', _LOCALE_DIR) -gettext.install('grasswxpy', _LOCALE_DIR) +if six.PY2: + gettext.install('grasslibs', _LOCALE_DIR, unicode=True) + gettext.install('grassmods', _LOCALE_DIR, unicode=True) + gettext.install('grasswxpy', _LOCALE_DIR, unicode=True) +else: + gettext.install('grasslibs', _LOCALE_DIR) + gettext.install('grassmods', _LOCALE_DIR) + gettext.install('grasswxpy', _LOCALE_DIR) __all__ = ["script", "temporal"] }}} -- Ticket URL: <https://trac.osgeo.org/grass/ticket/3838#comment:11> GRASS GIS <https://grass.osgeo.org>
_______________________________________________ grass-dev mailing list grass-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-dev