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):