arimelody/OpenTerminal

Backspace breaks emojis

Opened this issue · 1 comments

image

Using backspace on emojis like 🤩 causes them to become an unknown Unicode character, in this case � instead of deleting them. Might be because you're working with bytes instead of graphemes?

i do believe this is an issue to do with the buffer being a simple javascript string at present. i'm not 100% sure what the solution to this would be, beyond detecting emoji unicode pairs in the backspace process and sending two keystrokes, but feel free to experiment with this and send a PR if you have some success!