Fix for Issue2550609 diff -r e75f622180a6 -r 8f2e377cdeea roundup/backends/indexer_rdbms.py --- a/roundup/backends/indexer_rdbms.py Wed Oct 21 09:57:36 2009 +0000 +++ b/roundup/backends/indexer_rdbms.py Tue Nov 24 14:52:57 2009 -0500 @@ -64,8 +64,12 @@ self.db.cursor.execute(sql, (id, )) # ok, find all the unique words in the text - text = unicode(text, "utf-8", "replace").upper() - wordlist = [w.encode("utf-8") + def tryencode(str): + if not isinstance(str, unicode): + str = str.encode("utf-8", "eplace") + return str + text = tryencode(text).upper() + wordlist = [ tryencode(w) for w in re.findall(r'(?u)\b\w{%d,%d}\b' % (self.minlength, self.maxlength), text)] words = set()