From 6d7f28a70d5e24ff7d67b6989fc2fa19453a4885 Mon Sep 17 00:00:00 2001 From: toonn Date: Wed, 1 Sep 2021 17:53:16 +0200 Subject: spawn: Force UTF-8 encoding --- ranger/ext/spawn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ranger/ext/spawn.py b/ranger/ext/spawn.py index 57151c84..4bd0b499 100644 --- a/ranger/ext/spawn.py +++ b/ranger/ext/spawn.py @@ -35,7 +35,7 @@ def check_output(popenargs, **kwargs): with Popen23(popenargs, **kwargs) as process: stdout, _ = process.communicate() else: - with open(devnull, mode='w') as fd_devnull: + with open(devnull, mode='w', encoding="utf-8") as fd_devnull: with Popen23(popenargs, stderr=fd_devnull, **kwargs) as process: stdout, _ = process.communicate() -- cgit 1.4.1-2-gfad0