cathode icon indicating copy to clipboard operation
cathode copied to clipboard

Switch to UTF-8 input on Windows

Open alexrp opened this issue 3 years ago • 1 comments

Get rid of this whole workaround:

https://github.com/vezel-dev/cathode/blob/5f6d532af5848b1572766a345bd33a2c9d5b825b/src/core/Terminals/Windows/WindowsTerminalReader.cs#L50-L129

There should be no functional change; this is just cleanup. Maybe some slight performance gains at best.

alexrp avatar Jan 02 '22 05:01 alexrp

Some context:

  • microsoft/terminal#4551
  • microsoft/terminal#7777
  • microsoft/terminal#11956

alexrp avatar Jan 02 '22 05:01 alexrp

Looks like there is interesting progress happening on this: https://github.com/microsoft/terminal/pull/14745

alexrp avatar Feb 15 '23 13:02 alexrp

Note to self: Need to investigate how well UTF-8 input works on the latest Windows Terminal version. If it mostly Just Works, then we should switch to using it (and it'll be yet another strong argument for #102).

alexrp avatar Dec 12 '23 15:12 alexrp

Need to investigate how well UTF-8 input works on the latest Windows Terminal version.

Quite well, as it turns out! 🏴‍☠️ (4 code points) roundtrips as it should both with UTF-16 input (status quo) and UTF-8 input (with the ReadConsoleW workaround removed).

However, in cmd.exe, it only roundtrips with UTF-16 input. So, this really comes down to #102.

alexrp avatar Dec 14 '23 00:12 alexrp