Skip to content

gh-86427: Use the console code page for the stdio encoding on Windows - #155415

Open
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:gh-86427-console-cp
Open

gh-86427: Use the console code page for the stdio encoding on Windows#155415
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:gh-86427-console-cp

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

PyConfig.stdio_encoding is now initialized with the console output code page in the legacy Windows stdio mode.

Only one encoding can be specified for all standard streams, so sys.stdin.encoding is still wrong if the input code page differs from the output one. This is the minimal fix, suitable for backporting.

…indows

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant