From 7fc7d7487c65522c2dbc09f4a8c2a7cffa2085fa Mon Sep 17 00:00:00 2001 From: John Schember Date: Tue, 20 Sep 2011 20:07:41 -0400 Subject: [PATCH] Store: MobileRead plugin, Fix issue with searching with unicode characters. --- .../gui2/store/stores/mobileread/mobileread_plugin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/store/stores/mobileread/mobileread_plugin.py b/src/calibre/gui2/store/stores/mobileread/mobileread_plugin.py index 3ffb5c36a1..1aabe86c50 100644 --- a/src/calibre/gui2/store/stores/mobileread/mobileread_plugin.py +++ b/src/calibre/gui2/store/stores/mobileread/mobileread_plugin.py @@ -44,9 +44,12 @@ class MobileReadStore(BasicStoreConfig, StorePlugin): def search(self, query, max_results=10, timeout=60): books = self.get_book_list() + + if not books: + return sf = SearchFilter(books) - matches = sf.parse(query) + matches = sf.parse(query.decode('utf-8', 'replace')) for book in matches: book.price = '$0.00'