Fixed a crash on unicode characters.

Hi, a simple patch to fix this issue: https://github.com/glennw/RustAutoComplete/issues/13