neo-sh/neosh

Improve input encoding handling

Closed this issue · 1 comments

Right now neosh dies if someone inserts cyrillic characters, russian characters, etc that aren't part of LATIN1 encoding.

This is not an expected behavior, and we could use some crates like encoding.rs to deal with these characters.

I'm not sure the right solution here is to try to understand the encoding. If we could treat the user input as plain bytes, that would not only lift the unecessary UTF-8 restriction and thus make the shell more flexible, but also rule out a whole class of bugs.

We could look into the bstr crate, which provides string-like methods on bytes if needed.