KEMBAR78
gh-91952: Make TextIOWrapper.reconfigure() supports "locale" encoding by methane · Pull Request #91982 · python/cpython · GitHub
Skip to content

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