gh-86427: Use the console code page for the stdio encoding on Windows (GH-155415) In the legacy Windows stdio mode PyConfig.stdio_encoding is now initialized with the console output code page instead of the ANSI code page. Only one encoding can be specified, so sys.stdin.encoding is still wrong if the input code page differs from the output one.