Comment 10 for bug 383102

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: bzr search can't find non-ascii text

Robert, with attached test script I can trigger this traceback:

C:\Temp\search>python "test1.py"
C:\work\Bazaar\bzr-repo\bzr\bzrlib\btree_index.py:1092: UnicodeWarning: Unicode equal comparison failed to convert both argument
s to Unicode - interpreting them as being unequal
  needed_keys = sorted(needed_keys)
Traceback (most recent call last):
  File "test1.py", line 29, in <module>
    print list(index.search(query))
  File "C:\work\Bazaar\plugins\search\index.py", line 607, in search
    for component, termlist, common_doc_keys in self._search_work(termlist):
  File "C:\work\Bazaar\plugins\search\index.py", line 555, in _search_work
    component.term_2_index.iter_entries(term_keys[2])):
  File "C:\work\Bazaar\bzr-repo\bzr\bzrlib\btree_index.py", line 1092, in iter_entries
    needed_keys = sorted(needed_keys)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd2 in position 0: ordinal not in range(128)