From 3744b3ccd7b70dd9fa753d1c4e5a75251157915a Mon Sep 17 00:00:00 2001 From: DiMartinoXBMC Date: Thu, 17 Nov 2016 18:16:47 +0300 Subject: [PATCH] char fix --- functions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/functions.py b/functions.py index 4ca9123..0f33e64 100644 --- a/functions.py +++ b/functions.py @@ -2083,7 +2083,8 @@ def localize_path(path): def encode_msg(msg): try: - msg = isinstance(msg, unicode) and msg.encode('utf-8') or msg + msg = isinstance(msg, unicode) and msg.encode( + (sys.getfilesystemencoding() not in ('ascii', 'ANSI_X3.4-1968')) and sys.getfilesystemencoding() or 'utf-8') or msg except: import traceback log(traceback.format_exc())