From d3327f13a23a7d6582e89f4bd29627e9992761c1 Mon Sep 17 00:00:00 2001 From: Gregory Soutade Date: Thu, 23 Jun 2016 18:02:09 +0200 Subject: [PATCH] We don't need to encode data in utf8 for Search --- denote/search.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/denote/search.py b/denote/search.py index c2cc627..284258a 100755 --- a/denote/search.py +++ b/denote/search.py @@ -127,7 +127,7 @@ class Search: note = models.Note.objects.get(pk=index) self._indexContent(hashtable, index, note.text, 1) - self._indexContent(hashtable, index, note.title.encode('utf-8'), 5) + self._indexContent(hashtable, index, note.title, 5) def _index_note(self, note, saveDatabase=True): hashtable = self._loadDatabase() @@ -173,7 +173,7 @@ class Search: def search(self, string): hashtable = self._loadDatabase() - string = self._prepare_string(string.encode('utf-8')) + string = self._prepare_string(string) wordlist = string.split(' ')