On Sun Nov 24 12:41:00 2024 +0000, eric pouech wrote:
I'm puzzled by a couple of items:
- use of (Get|Set)ConsoleOutputCP(), while the changes are mostly on
input, not output
- changing SetConsoleOutputCP() into SetConsoleCP() let the test also pass
- I would have preferred toying with the CP inside the .cmd files
themselves, but 'chcp 65001' as a command doesn't help here (as I hoped it would; and yet does it set the console cp to utf8) so I feel like we're missing something
Thank you for reviewing.
- use of (Get|Set)ConsoleOutputCP(), while the changes are mostly on input, not output
Yes, this is counter intuitive. So why not think of (Get|Set)ConsoleCP() as controlling keyboard input and (Get|Set)ConsoleOutputCP() as controlling the rest?
- changing SetConsoleOutputCP() into SetConsoleCP() let the test also pass
That surprises me. I have tried as well and see some failures --- see https://testbot.winehq.org/JobDetails.pl?Key=149930 .
- I would have preferred toying with the CP inside the .cmd files themselves, but 'chcp 65001' as a command doesn't help here (as I hoped it would; and yet does it set the console cp to utf8)
I was similarly perplexed. Though the original code that showed symptoms called chcp, I prefer to call SetConsoleOuputCP() explicitly to avoid confusion between ConsoleCP and ConsoleOutputCP. Don't you think so?