From b396a9f19e1f3657d006d6c5a367713a9a8ebe1b Mon Sep 17 00:00:00 2001 From: James Vega Date: Sun, 19 Sep 2004 23:22:10 +0000 Subject: [PATCH] Fix for bug #1029837, exception when calling google with unicode characters. --- plugins/Google.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/Google.py b/plugins/Google.py index ed26f4d68..c781f38f2 100644 --- a/plugins/Google.py +++ b/plugins/Google.py @@ -104,7 +104,8 @@ def search(log, queries, **kwargs): proxy = conf.supybot.protocols.http.proxy() if proxy: kwargs['http_proxy'] = proxy - data = google.doGoogleSearch(' '.join(queries), **kwargs) + query = ' '.join(queries).decode('utf-8') + data = google.doGoogleSearch(query, **kwargs) searches = conf.supybot.plugins.Google.state.searches() + 1 conf.supybot.plugins.Google.state.searches.setValue(searches) time = conf.supybot.plugins.Google.state.time() + data.meta.searchTime