vezel-dev / cathode

A terminal-centric replacement for the .NET console APIs.
https://docs.vezel.dev/cathode
BSD Zero Clause License
91 stars 7 forks source link

Consider Windows console code page to be part of console mode #74

Closed alexrp closed 2 years ago

alexrp commented 2 years ago

https://github.com/alexrp/system-terminal/blob/f559b4da9c07e82b54073ce53eda83a1704eaecd/src/core/Terminals/Windows/WindowsVirtualTerminal.cs#L63-L66

We should restore these values to whatever they were.

alexrp commented 2 years ago

There's a broader issue here, come to think of it. Child processes could change the console encoding out from under us too. Perhaps on Windows we should just consider console encoding to be part of the console 'mode', i.e. we set it in SetRawMode and restore it in DangerousRestoreSettings.