Valloric/YouCompleteMe — pull request #254 by JazzCore (2013-04-18 21:52:13+00:00)
Title: Add matching function for non-ascii candidates

This PR refers to #233 and #197. Currently there is no way to use YCM matching in strings with non-ASCII symbols because of Bitset and ListNode limitations.
I've added another version of ``FilterAndSortCandidates`` function with a different function prototype. It takes a list of candidates and returns sorted list of matches. I does work well with special non-ASCII symbols. Small example:

```python
>>> lst = ['Öse', 'test string', 'hello', 'да']
>>> ycm_core.FilterAndSortCandidates(lst,'s')
['test string', '\xc3\x96se']
>>> ycm_core.FilterAndSortCandidates(lst,'')
['\xc3\x96se', 'test string', 'hello', '\xd0\xb4\xd0\xb0']
```
Since we cant use YCM fuzzy matching, i've made an adapted version of [CommandT]((https://github.com/wincent/Command-T.git) matching, which is quite good.

There are not so many use cases for this function, but i can be used in some completers that interact with OS and can get a specific non-ascii symbols. Here's an example of a completer that uses this function for matching and sorting. As you can see it properly show cyrillic symbols in completion window:

![fname](https://f.cloud.github.com/assets/1290755/398998/1aad3210-a864-11e2-9e51-8da7a7956b19.gif)