Commit Graph

1 Commits

Author SHA1 Message Date
Ryan Prichard
fd8737d3f0 Behave somewhat more sensibly with UTF-16 surrogate pairs
* On output: detect them and transcode them properly into UTF-8.

 * On input: create input records for both halfs of the surrogate pair.

I tested by copying-and-pasting U+20000 (D840 DC00) into a mintty bash
shell.  It works, but the Windows console thinks the character occupies
four cells when it really occupies two, so the cursor position is wrong.
When I press backspace, it doesn't delete the whole character -- instead,
it replaces it with a '?', because it becomes an invalid surrogate pair.

Still, the behavior seems like an improvement.
2015-10-14 04:11:32 -05:00