That surprises me. I have tried as well and see some failures --- see https://testbot.winehq.org/JobDetails.pl?Key=149930 .
sorry, looks like I messed up with my tests.
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?
as your original test case comes from using chcp (which sets both cp), and all the testing done shows that cmd.exe relies on output cp, I don't think it matters too much
one the previous failure I was seeing comes from the fact that native cmd in cp65001 interprets CR (alone) wrongly and fails parsing (so be sure to always use CRLF <g>)
I've tried to generate the test files inside the current tests, and made some interesting progress:
https://testbot.winehq.org/JobDetails.pl?Key=149935
yes it's very convoluted to say the least, but we need to:
* run the test in another cmd instance so that we don't temper current cmd's instance codepage * ensure that the lines that generate the test.cmd (which contain multibyte characters for the 65001 cp) are not wrongly interpreted in current cp
even if it's convoluted, I'd rather go that way as we control all bits from withing the tests_*.cmd and don't rely on external parameters