From 15f4e7e94c5d04ff7c0a10cfdb8026fc70862aa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Thu, 3 Sep 2009 19:30:29 +0200 Subject: And here is the debugging again :) ... using ctypes --- portato/gui/windows/basic.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'portato') 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): -- cgit v1.2.3