From 925fde4260ab5e76820d1bc6a87a372f0a6b42d8 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Mon, 6 Sep 2010 12:50:18 +0200 Subject: win fixes, updated locale + pl --- pyLoadCore.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'pyLoadCore.py') diff --git a/pyLoadCore.py b/pyLoadCore.py index 30468bac2..d92841d56 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -28,6 +28,7 @@ import gettext from imp import find_module import logging import logging.handlers +import os from os import _exit from os import execv from os import getcwd @@ -65,7 +66,12 @@ from module.web.ServerThread import WebServer from module.FileDatabase import PyFile from codecs import getwriter -sys.stdout = getwriter("utf8")(sys.stdout, errors = "replace") +if os.name == "nt": + enc = "cp850" +else: + enc = "utf8" + +sys.stdout = getwriter(enc)(sys.stdout, errors = "replace") class Core(object): """ pyLoad Core """ -- cgit v1.2.3