diff --git a/visidata/path.py b/visidata/path.py index 74b18bb1c..66703d3bb 100644 --- a/visidata/path.py +++ b/visidata/path.py @@ -238,9 +238,10 @@ def open(self, mode='rt', encoding=None, encoding_errors=None, newline=None): return self.rfile.reopen() if self.fp: - self.fptext = codecs.iterdecode(self.fp, - encoding=encoding or vd.options.encoding, - errors=encoding_errors or vd.options.encoding_errors) + if 'b' not in mode: + self.fptext = codecs.iterdecode(self.fp, + encoding=encoding or vd.options.encoding, + errors=encoding_errors or vd.options.encoding_errors) if self.fptext: self.rfile = RepeatFile(self.fptext)