Skip to content

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

Merged
serhiy-storchaka merged 1 commit into
python:3.14from
miss-islington:backport-0bb312a-3.14
Aug 29, 2026
Merged

[3.14] gh-86427: Use the console code page for the stdio encoding on Windows (GH-155415)#156603
serhiy-storchaka merged 1 commit into
python:3.14from
miss-islington:backport-0bb312a-3.14

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>
@serhiy-storchaka
serhiy-storchaka enabled auto-merge (squash) August 29, 2026 19:20
@serhiy-storchaka
serhiy-storchaka merged commit d4ae98b into python:3.14 Aug 29, 2026
51 checks passed
@miss-islington
miss-islington deleted the backport-0bb312a-3.14 branch August 29, 2026 19:45
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