diff options
author | toonn <toonn@toonn.io> | 2021-09-01 17:53:15 +0200 |
---|---|---|
committer | toonn <toonn@toonn.io> | 2021-09-01 17:57:15 +0200 |
commit | 08ab6b9fd3c2beada39951576ebf017d5a65f3f7 (patch) | |
tree | c66bf57d15eaecfe4a021478a570bc6aa16d05b1 | |
parent | 903f352beea83cc3ee9a6b62ccb735cf6b0ad02c (diff) | |
download | ranger-08ab6b9fd3c2beada39951576ebf017d5a65f3f7.tar.gz |
loader: Force UTF-8 encoding
-rw-r--r-- | ranger/core/loader.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ranger/core/loader.py b/ranger/core/loader.py index 99e60abf..5c9e28a5 100644 --- a/ranger/core/loader.py +++ b/ranger/core/loader.py @@ -178,7 +178,9 @@ class CommandLoader( # pylint: disable=too-many-instance-attributes # pylint: disable=consider-using-with popenargs = {} if self.popenArgs is None else self.popenArgs popenargs['stdout'] = popenargs['stderr'] = PIPE - popenargs['stdin'] = PIPE if self.input else open(os.devnull, 'r') + popenargs['stdin'] = ( + PIPE if self.input else open(os.devnull, 'r', encoding="utf-8") + ) self.process = process = Popen(self.args, **popenargs) self.signal_emit('before', process=process, loader=self) if self.input: |