Comment 14 for bug 383102

Revision history for this message
Robert Collins (lifeless) wrote : Re: bzr search can't find non-ascii text

Hmm, I mistyped my change - of course it should be
test_term(TEST_RU.encode('cp1251'))

Anyhow:

(Pdb) print list(term_index.iter_all_entries())
[(<bzrlib.plugins.search.index.SuggestableBTreeGraphIndex object at 0x2617190>, ('1',), '4 1 765 142'), (<bzrlib.plugins.search.index.SuggestableBTreeGraphIndex object at 0x2617190>, ('2',), '5 1 925 142'), (<bzrlib.plugins.search.index.SuggestableBTreeGraphIndex object at 0x2617190>, ('bar',), '1 1 445 142'), (<bzrlib.plugins.search.index.SuggestableBTreeGraphIndex object at 0x2617190>, ('foo',), '0 1 285 142')]

This indicates that only four terms were found during the index phase: 1, 2, bar and foo. So the cp1251 string is being treated as whitespace or something similar.