From: Stas Sergeev Date: Thu, 4 Nov 2010 22:23:18 +0000 (+0000) Subject: this enabled UTF8 for some recent versions of python2. X-Git-Tag: 2.0~28 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=d3da14111c11ca4bad7c9bf802d0771267a2df08;p=super-star-trek.git this enabled UTF8 for some recent versions of python2. python3 has no problems at all --- diff --git a/src/sst.py b/src/sst.py index a3455bf..448b6ea 100644 --- a/src/sst.py +++ b/src/sst.py @@ -3063,6 +3063,12 @@ curwnd = None def iostart(): global stdscr, rows + "for some recent versions of python2, the following enables UTF8" + "for the older ones we probably need to set C locale, and the python3" + "has no problems at all" + if sys.version_info.major < 3: + import locale + locale.setlocale(locale.LC_ALL, "") gettext.bindtextdomain("sst", "/usr/local/share/locale") gettext.textdomain("sst") if not (game.options & OPTION_CURSES):