From 93ecc2424f1b0dc4b56169d73536e313c57bd836 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Mon, 13 May 2013 14:18:22 +0200 Subject: [PATCH] Google: Fix encoding issue. --- plugins/Google/plugin.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/Google/plugin.py b/plugins/Google/plugin.py index ea4dccfc2..0f09af064 100644 --- a/plugins/Google/plugin.py +++ b/plugins/Google/plugin.py @@ -140,12 +140,15 @@ class Google(callbacks.PluginRegexp): results.append(format('%s: %u', title, url)) else: results.append(url) + if sys.version_info[0] < 3: + repl = lambda x:x if isinstance(x, unicode) else unicode(x, 'utf8') + results = map(repl, results) if not results: - return [format(_('No matches found.'))] + return [_('No matches found.')] elif onetoone: return results else: - return [format('; '.join(results))] + return [u'; '.join(results)] @internationalizeDocstring def lucky(self, irc, msg, args, opts, text):