Mercurial > p > roundup > code
diff roundup/cgi/templating.py @ 3332:c8cdfa100a9b
use unicode for index searches [SF#1195739]
| author | Alexander Smishlajev <a1s@users.sourceforge.net> |
|---|---|
| date | Sun, 22 May 2005 17:57:26 +0000 |
| parents | 8c7b522dc934 |
| children | afe094d2daed |
line wrap: on
line diff
--- a/roundup/cgi/templating.py Sun May 22 17:55:00 2005 +0000 +++ b/roundup/cgi/templating.py Sun May 22 17:57:26 2005 +0000 @@ -2222,7 +2222,10 @@ klass = self.client.db.getclass(self.classname) if self.search_text: matches = self.client.db.indexer.search( - re.findall(r'\b\w{2,25}\b', self.search_text), klass) + [w.upper().encode("utf-8", "replace") for w in re.findall( + r'(?u)\b\w{2,25}\b', + unicode(self.search_text, "utf-8", "replace") + )], klass) else: matches = None
