this enabled UTF8 for some recent versions of python2.
authorStas Sergeev <stsp@aknet.ru>
Thu, 4 Nov 2010 22:23:18 +0000 (22:23 +0000)
committerStas Sergeev <stsp@aknet.ru>
Thu, 4 Nov 2010 22:23:18 +0000 (22:23 +0000)
python3 has no problems at all

src/sst.py

index a3455bfbf20e076b7c6439e1ecf5422cefadd0ec..448b6ea0ea5e4148a1707f65e4b72715584cc564 100644 (file)
@@ -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):