Skip to content

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

Merged
serhiy-storchaka merged 1 commit into
python:3.15from
miss-islington:backport-0bb312a-3.15
Oct 10, 2026
Merged

serhiy-storchaka merged 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 0bb312a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@serhiy-storchaka
serhiy-storchaka merged commit 4e62a8a into python:3.15 Oct 10, 2026
56 checks passed
@miss-islington
miss-islington deleted the backport-0bb312a-3.15 branch October 10, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants