diff --git a/rtv/terminal.py b/rtv/terminal.py index ec0d952..22c8d8d 100644 --- a/rtv/terminal.py +++ b/rtv/terminal.py @@ -381,7 +381,7 @@ class Terminal(object): try: with self.suspend(): p = subprocess.Popen([pager], stdin=subprocess.PIPE) - p.stdin.write(self.clean(data)) + p.stdin.write(data.encode('utf-8')) p.stdin.close() try: p.wait() @@ -450,15 +450,14 @@ class Terminal(object): urlview = os.getenv('RTV_URLVIEWER') or 'urlview' try: with self.suspend(): - p = subprocess.Popen([urlview], - stdin=subprocess.PIPE) + p = subprocess.Popen([urlview], stdin=subprocess.PIPE) try: - p.communicate(input=six.b(data)) + p.communicate(input=data.encode('utf-8')) except KeyboardInterrupt: p.terminate() except OSError: self.show_notification( - 'Could not open urls with {}'.format(urlview)) + 'Failed to open {0}'.format(urlview)) def text_input(self, window, allow_resize=False): """