Activity log for bug #537730

Date Who What changed Old value New value Message
2010-03-11 22:41:39 Alexey Porotnikov bug added bug
2010-03-11 22:43:03 Alexey Porotnikov description I have LANG=ru_RU.UTF-8 and much *.desktop files in the directory ~/.local/share/applications/wine/Программы, created by WINE. "Программы" it "Programs" in Russian. And kupfer with some circumstances enters catalepsy, making a log Traceback (most recent call last): File "/home/user/workspace/kupfer/src/kupfer/core/data.py", line 290, in search decorator=decorator) File "/home/user/workspace/kupfer/src/kupfer/core/data.py", line 118, in search reverse=True) File "/home/user/workspace/kupfer/src/kupfer/core/search.py", line 45, in bonus_objects for obj in rankables: File "/home/user/workspace/kupfer/src/kupfer/core/search.py", line 69, in score_objects arank = _score(alias, key)*95 File "/home/user/workspace/kupfer/src/kupfer/core/relevance.py", line 138, in score if ls[i + 1] in query: TypeError: 'in <string>' requires string as left operand The crash of scoring function happens, if the analysis of initial characters of words receives the cyrillic character ("П" in this case) after a hyphen or a blank in the folded application name that is if the previous pressed character has been found to the left of this combination of characters and the current character is found to the right of a combination. ls[i+1] gives the first byte of utf-9 representation (0xd0 for "П"), but not the first character of a word. The error does not arise under following conditions I have moved the "Программы" from a field of view - the error does not arise. I have returned "Программы" and have renamed to "Programs" - the error does not arise. I have renamed "Программы" to "0Программы" - the error does not arise. I have LANG=ru_RU.UTF-8 and much *.desktop files in the directory ~/.local/share/applications/wine/Программы, created by WINE. "Программы" it "Programs" in Russian. And kupfer with some circumstances enters catalepsy, making a log Traceback (most recent call last): File "/home/user/workspace/kupfer/src/kupfer/core/data.py", line 290, in search decorator=decorator) File "/home/user/workspace/kupfer/src/kupfer/core/data.py", line 118, in search reverse=True) File "/home/user/workspace/kupfer/src/kupfer/core/search.py", line 45, in bonus_objects for obj in rankables: File "/home/user/workspace/kupfer/src/kupfer/core/search.py", line 69, in score_objects arank = _score(alias, key)*95 File "/home/user/workspace/kupfer/src/kupfer/core/relevance.py", line 138, in score if ls[i + 1] in query: TypeError: 'in <string>' requires string as left operand The crash of scoring function happens, if the analysis of initial characters of words receives the cyrillic character ("П" in this case) after a hyphen or a blank in the folded application name that is if the previous pressed character has been found to the left of this combination of characters and the current character is found to the right of a combination. ls[i+1] gives the first byte of utf-8 representation (0xd0 for "П"), but not the first character of a word. The error does not arise under following conditions I have moved the "Программы" from a field of view - the error does not arise. I have returned "Программы" and have renamed to "Programs" - the error does not arise. I have renamed "Программы" to "0Программы" - the error does not arise.
2010-03-12 03:14:18 X kupfer: assignee Ulrik Sverdrup (ulrik-sverdrup)
2010-03-12 12:06:53 X kupfer: status New Fix Committed
2010-03-16 01:40:55 X kupfer: status Fix Committed Fix Released