Skip to content

[3.15] gh-86427: Use the console code page for the stdio encoding on Windows (GH-155415) - #156602

Open
miss-islington wants to merge 1 commit into
python:3.15from
miss-islington:backport-0bb312a-3.15
Open

[3.15] gh-86427: Use the console code page for the stdio encoding on Windows (GH-155415)#156602
miss-islington wants to merge 1 commit into
python:3.15from
miss-islington:backport-0bb312a-3.15

Conversation

@miss-islington

@miss-islington miss-islington commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

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.
(cherry picked from commit 0bb312a)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com

…indows (pythonGH-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.
(cherry picked from commit 0bb312a4eacc5df4d5556f61694416644fd6902b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants