diff frontends/src/jp/cmd_pubsub.py @ 2320:f4a0723042ee

jp (pubsub/search): fixed encoding for stdin in external commands
author Goffi <goffi@goffi.org>
date Sun, 09 Jul 2017 15:20:31 +0200
parents ddb67c186f61
children d94e932be8b3
line wrap: on
line diff
--- a/frontends/src/jp/cmd_pubsub.py	Sat Jul 08 23:21:01 2017 +0200
+++ b/frontends/src/jp/cmd_pubsub.py	Sun Jul 09 15:20:31 2017 +0200
@@ -702,7 +702,7 @@
                 ret = subprocess.call(cmd_args)
             else:
                 p = subprocess.Popen(cmd_args, stdin=subprocess.PIPE)
-                p.communicate(item)
+                p.communicate(item.encode('utf-8'))
                 ret = p.wait()
             if ret != 0:
                 self.disp(A.color(C.A_FAILURE, _(u"executed command failed with exit code {code}").format(code=ret)))