Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UTF-8 Mode: TextIOWrapper.reconfigure should support encoding="locale" #91952

Closed
methane opened this issue Apr 26, 2022 · 0 comments · Fixed by #91982
Closed

UTF-8 Mode: TextIOWrapper.reconfigure should support encoding="locale" #91952

methane opened this issue Apr 26, 2022 · 0 comments · Fixed by #91982
Labels
topic-IO type-feature A feature request or enhancement

Comments

@methane
Copy link
Member

methane commented Apr 26, 2022

Feature or enhancement

TextIOWrapper.__init__() supports encoding="locale" option.
But TextIOWrapper.reconfigure() doesn't support it yet.

Pitch

Scenario:

Users may set PYTHONUTF8=1 enviroment variable but want to use locale encoding for stdin/stdout.

They may want to do sys.stdout.reconfigure(encoding="locale").

@methane methane added the type-feature A feature request or enhancement label Apr 26, 2022
@methane methane changed the title PEP 686: TextIOWrapper.reconfigure should support encoding="locale" UTF-8 Mode: TextIOWrapper.reconfigure should support encoding="locale" Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-IO type-feature A feature request or enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants