Skip to content

Commit 3c74019

Browse files
author
Alexander Smishlajev
committed
use unicode for index searches [SF#1195739]
1 parent 446f065 commit 3c74019

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

roundup/cgi/templating.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2222,7 +2222,10 @@ def batch(self):
22222222
klass = self.client.db.getclass(self.classname)
22232223
if self.search_text:
22242224
matches = self.client.db.indexer.search(
2225-
re.findall(r'\b\w{2,25}\b', self.search_text), klass)
2225+
[w.upper().encode("utf-8", "replace") for w in re.findall(
2226+
r'(?u)\b\w{2,25}\b',
2227+
unicode(self.search_text, "utf-8", "replace")
2228+
)], klass)
22262229
else:
22272230
matches = None
22282231

0 commit comments

Comments
 (0)