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

gh-91952: Make TextIOWrapper.reconfigure() supports "locale" encoding #91982

Merged
merged 2 commits into from
May 1, 2022

Conversation

methane
Copy link
Member

@methane methane commented Apr 27, 2022

Fix #91952

$ LANG=ja_JP.eucJP
$ export PYTHONUTF8=1
$ ./python.exe
Python 3.11.0a7+ (heads/main-dirty:29e2245ad5, Apr 27 2022, 17:57:13) [Clang 12.0.0 (clang-1200.0.32.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.stdin.encoding
'utf-8'
>>> sys.stdin.reconfigure(encoding="locale")
>>> sys.stdin.encoding
'eucJP'

@methane methane changed the title bpo-91952: Make TextIOWrapper.reconfigure() supports "locale" encoding gh-91952: Make TextIOWrapper.reconfigure() supports "locale" encoding May 1, 2022
@methane methane merged commit 0729b31 into python:main May 1, 2022
@methane methane deleted the reconfigure branch May 1, 2022 01:44
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.

UTF-8 Mode: TextIOWrapper.reconfigure should support encoding="locale"
2 participants