From ba233cf653a7b6b801bfdfb42aebe3723c1e5673 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Wed, 02 May 2012 15:33:18 +0000 Subject: Use UNICODE string to search into places SL #2830 Decode (using 'utf-8') the string inserted by the user in the URL address bar to search with SQLite into places' database. This is the proper thing to do in Python 2, as this wiki page states: http://python-gtk-3-tutorial.readthedocs.org/en/latest/unicode.html#unicode-in-gtk Signed-off-by: Manuel Kaufmann Acked-by: Manuel QuiƱones Acked-by: Simon Schampijer --- (limited to 'webtoolbar.py') diff --git a/webtoolbar.py b/webtoolbar.py index c24aa87..28bc015 100644 --- a/webtoolbar.py +++ b/webtoolbar.py @@ -121,7 +121,8 @@ class WebEntry(iconentry.IconEntry): def _search_update(self): list_store = Gtk.ListStore(str, str) - for place in places.get_store().search(self.props.text): + search_text = self.props.text.decode('utf-8') + for place in places.get_store().search(search_text): list_store.append([place.uri, place.title]) self._search_view.set_model(list_store) -- cgit v0.9.1