From 01cebd1ccc8e83dbbbe78d27ae1f4e14b206e5b7 Mon Sep 17 00:00:00 2001 From: "Sean B. Palmer" Date: Thu, 23 Dec 2010 19:34:03 +0000 Subject: HTTPS title support, and a minor encoding fix. --- modules/translate.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules/translate.py') diff --git a/modules/translate.py b/modules/translate.py index e637d01..d5ae41f 100755 --- a/modules/translate.py +++ b/modules/translate.py @@ -46,6 +46,8 @@ def tr(phenny, context): if input != output: msg = translate(phrase, input, output) + if isinstance(msg, str): + msg = msg.decode('utf-8') if msg: msg = web.decode(msg) # msg.replace(''', "'") msg = '"%s" (%s to %s, translate.google.com)' % (msg, input, output) -- cgit v1.2.3-1-g7c22