summaryrefslogtreecommitdiff
path: root/portato/gui/windows
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-09-03 19:30:29 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-09-03 19:30:29 +0200
commit15f4e7e94c5d04ff7c0a10cfdb8026fc70862aa8 (patch)
tree68ec5874452a7fd6cc6a8325e93371aa9fb381ed /portato/gui/windows
parent506c6919fa6dd01b738e022e625105d12cd05c48 (diff)
downloadportato-15f4e7e94c5d04ff7c0a10cfdb8026fc70862aa8.tar.gz
portato-15f4e7e94c5d04ff7c0a10cfdb8026fc70862aa8.tar.bz2
portato-15f4e7e94c5d04ff7c0a10cfdb8026fc70862aa8.zip
And here is the debugging again :) ... using ctypes
Diffstat (limited to 'portato/gui/windows')
-rw-r--r--portato/gui/windows/basic.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/portato/gui/windows/basic.py b/portato/gui/windows/basic.py
index 3cedd69..e7f48a6 100644
--- a/portato/gui/windows/basic.py
+++ b/portato/gui/windows/basic.py
@@ -20,10 +20,11 @@ from functools import wraps
import os.path
from ...constants import TEMPLATE_DIR, APP, LOCALE_DIR
-from ...helper import error
+from ...helper import error, debug
# for the GtkBuilder to translate correctly :)
import ctypes
+from locale import CODESET
try:
getlib = ctypes.cdll.LoadLibrary("libgettextlib.so")
except OSError:
@@ -31,6 +32,12 @@ except OSError:
else:
getlib.textdomain(APP)
getlib.bindtextdomain(APP, LOCALE_DIR)
+
+ # some debugging output about the current codeset used
+ nll = getlib.nl_langinfo
+ nll.restype = ctypes.c_char_p
+ debug("Switching from '%s' to 'UTF-8'.", nll(CODESET))
+
getlib.bind_textdomain_codeset(APP, "UTF-8")
class WrappedTree (object):