From 21cb1f23a6e9c0991c9ceaa14d66ab2052cdc5e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Tue, 18 Sep 2012 22:43:59 +0200 Subject: [PATCH] encode utf8 result --- doku.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doku.py b/doku.py index 81c9d1b..a74cfc1 100644 --- a/doku.py +++ b/doku.py @@ -27,6 +27,6 @@ class DokuWiki: if not self.callcache.has_key(key): cmd = ['./doku.php', method ] + args res = subprocess.Popen(cmd, stdin = None, stdout = subprocess.PIPE, stderr = sys.stderr, close_fds = True).communicate() - print "%s->%s" % (cmd, res) - self.callcache[key] = res[0] + self.callcache[key] = unicode(res[0].decode('utf-8')) + print "%s->%s" % (cmd, self.callcache[key]) return self.callcache[key]