diff options
-rw-r--r-- | ranger/core/loader.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ranger/core/loader.py b/ranger/core/loader.py index 2184d2b1..b1aabb53 100644 --- a/ranger/core/loader.py +++ b/ranger/core/loader.py @@ -260,7 +260,8 @@ def safeDecode(string): return string.decode("utf-8") except (UnicodeDecodeError): if HAVE_CHARDET: - return string.decode(chardet.detect(string)["encoding"]) + codec = chardet.detect(string)["encoding"] + return string.decode(codec, 'ignore') else: return "" |