From 7c7f3902f61e41f0367643d2eaca9f3ca49d370e Mon Sep 17 00:00:00 2001 From: toonn Date: Wed, 1 Sep 2021 17:53:16 +0200 Subject: runner: Force UTF-8 encoding --- ranger/core/runner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ranger/core/runner.py b/ranger/core/runner.py index ded64b5d..1d2b91f7 100644 --- a/ranger/core/runner.py +++ b/ranger/core/runner.py @@ -194,8 +194,8 @@ class Runner(object): # pylint: disable=too-few-public-methods if 's' in context.flags: # Using a with-statement for these is inconvenient. # pylint: disable=consider-using-with - devnull_writable = open(os.devnull, 'w') - devnull_readable = open(os.devnull, 'r') + devnull_writable = open(os.devnull, 'w', encoding="utf-8") + devnull_readable = open(os.devnull, 'r', encoding="utf-8") for key in ('stdout', 'stderr'): popen_kws[key] = devnull_writable toggle_ui = False -- cgit 1.4.1-2-gfad0