mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 06:49:24 +01:00
Google: Fix encoding issue.
This commit is contained in:
parent
8421300e14
commit
93ecc2424f
@ -140,12 +140,15 @@ class Google(callbacks.PluginRegexp):
|
|||||||
results.append(format('%s: %u', title, url))
|
results.append(format('%s: %u', title, url))
|
||||||
else:
|
else:
|
||||||
results.append(url)
|
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:
|
if not results:
|
||||||
return [format(_('No matches found.'))]
|
return [_('No matches found.')]
|
||||||
elif onetoone:
|
elif onetoone:
|
||||||
return results
|
return results
|
||||||
else:
|
else:
|
||||||
return [format('; '.join(results))]
|
return [u'; '.join(results)]
|
||||||
|
|
||||||
@internationalizeDocstring
|
@internationalizeDocstring
|
||||||
def lucky(self, irc, msg, args, opts, text):
|
def lucky(self, irc, msg, args, opts, text):
|
||||||
|
Loading…
Reference in New Issue
Block a user