rschmitt / heatseeker

A high-performance Selecta clone, written in Rust.
MIT License
214 stars 10 forks source link

Support Unicode input #8

Closed rschmitt closed 9 years ago

rschmitt commented 9 years ago

Although matching itself is basically Unicode-aware (or at least code point aware), input is handled a byte at a time, under the antiquated assumption that a byte is a char. This strategy obviously breaks when you want to type "東欧を覆う" or "☃" or even just "Mötley Crüe" as part of a query.

I'm not sure if the Rust standard library has an online algorithm that converts a stream of bytes into a stream of chars; that is the only part that might be slightly tricky.