From 80cc43e0ceec2970d13cc7db62473456ba246923 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Thu, 11 Feb 2010 21:25:27 +0100 Subject: locale fix --- pyLoadCore.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pyLoadCore.py') diff --git a/pyLoadCore.py b/pyLoadCore.py index b2ee524a6..0c144b3a6 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -45,6 +45,7 @@ import subprocess from sys import argv from sys import executable from sys import exit +import sys from sys import path from sys import stdout from sys import version_info @@ -110,7 +111,7 @@ class Core(object): self.do_kill = False self.do_restart = False translation = gettext.translation("pyLoad", self.make_path("locale"), languages=[self.config['general']['language']]) - translation.install(unicode=(False if sys.stdout.encoding == "ascii" else True)) + translation.install(unicode=(True if sys.stdout.encoding.lower().startswith("utf") else False)) self.check_install("Crypto", _("pycrypto to decode container files")) self.check_install("Image", _("Python Image Libary (PIL) for captha reading")) -- cgit v1.2.3