From f9840c39c0f7ca13d429a36bca98b36ae0e82510 Mon Sep 17 00:00:00 2001 From: inpos Date: Thu, 10 Mar 2016 18:15:54 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B0=20=D0=B2?= =?UTF-8?q?=20localize=5Fpath?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pyrrent2http/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pyrrent2http/util.py b/lib/pyrrent2http/util.py index 51c2b6c..d6df7bd 100644 --- a/lib/pyrrent2http/util.py +++ b/lib/pyrrent2http/util.py @@ -6,7 +6,7 @@ import chardet def localize_path(path): path = path.decode(chardet.detect(path)['encoding']) if not sys.platform.startswith('win'): - path = path.encode(sys.getfilesystemencoding()) + path = path.encode(True and sys.getfilesystemencoding() or 'utf-8') return path def can_bind(host, port):