-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
Enable UTF-8 mode by default (implement PEP 686) #133711
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
Labels
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
type-feature
A feature request or enhancement
Comments
Please wait until we fix all errors in the tests and the stdlib when running in a non-UTF-8 locale (see #133677). Then ensure that all tests are still passed in a non-UTF-8 locale after this change. |
vstinner
added a commit
to vstinner/cpython
that referenced
this issue
May 28, 2025
Use "backslashreplace" error handler to decode stdout and stderr. Example: vstinner@WIN C:\victor\python\main\build\test_python_worker_8360\x91> "C:\victor\python\main\PCbuild\amd64\python_d.exe" -m test --fast-ci --slow-ci --testdir C:\Users\vstinner\AppData\Local\Temp\tmp0t59e8da test_regrtest_noop1 test_regrtest_noop2 test_regrtest_noop3 test_regrtest_noop4 Notice the "\x91" byte at the end of the first line: it's the non-ASCII U+00E6 character encoded to the OEM cp437 code page.
vstinner
added a commit
to vstinner/cpython
that referenced
this issue
May 28, 2025
Add _winapi.GetOEMCP() function.
vstinner
added a commit
to vstinner/cpython
that referenced
this issue
May 28, 2025
Add _winapi.GetOEMCP() function.
vstinner
added a commit
to vstinner/cpython
that referenced
this issue
May 28, 2025
Skip the test if the Python UTF-8 Mode is enabled and the LC_CTYPE encoding is not UTF-8.
vstinner
added a commit
that referenced
this issue
May 28, 2025
Use "backslashreplace" error handler to decode stdout and stderr. Example: vstinner@WIN C:\victor\python\main\build\test_python_worker_8360\x91> "C:\victor\python\main\PCbuild\amd64\python_d.exe" -m test --fast-ci --slow-ci --testdir C:\Users\vstinner\AppData\Local\Temp\tmp0t59e8da test_regrtest_noop1 test_regrtest_noop2 test_regrtest_noop3 test_regrtest_noop4 Notice the "\x91" byte at the end of the first line: it's the non-ASCII U+00E6 character encoded to the OEM cp437 code page.
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
May 28, 2025
Use "backslashreplace" error handler to decode stdout and stderr. Example: vstinner@WIN C:\victor\python\main\build\test_python_worker_8360\x91> "C:\victor\python\main\PCbuild\amd64\python_d.exe" -m test --fast-ci --slow-ci --testdir C:\Users\vstinner\AppData\Local\Temp\tmp0t59e8da test_regrtest_noop1 test_regrtest_noop2 test_regrtest_noop3 test_regrtest_noop4 Notice the "\x91" byte at the end of the first line: it's the non-ASCII U+00E6 character encoded to the OEM cp437 code page. (cherry picked from commit 9161827) Co-authored-by: Victor Stinner <vstinner@python.org>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
May 28, 2025
Use "backslashreplace" error handler to decode stdout and stderr. Example: vstinner@WIN C:\victor\python\main\build\test_python_worker_8360\x91> "C:\victor\python\main\PCbuild\amd64\python_d.exe" -m test --fast-ci --slow-ci --testdir C:\Users\vstinner\AppData\Local\Temp\tmp0t59e8da test_regrtest_noop1 test_regrtest_noop2 test_regrtest_noop3 test_regrtest_noop4 Notice the "\x91" byte at the end of the first line: it's the non-ASCII U+00E6 character encoded to the OEM cp437 code page. (cherry picked from commit 9161827) Co-authored-by: Victor Stinner <vstinner@python.org>
This was referenced May 28, 2025
vstinner
added a commit
that referenced
this issue
May 28, 2025
Skip the test if the Python UTF-8 Mode is enabled and the LC_CTYPE encoding is not UTF-8.
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
May 28, 2025
…thonGH-134841) Skip the test if the Python UTF-8 Mode is enabled and the LC_CTYPE encoding is not UTF-8. (cherry picked from commit 4635115) Co-authored-by: Victor Stinner <vstinner@python.org>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
May 28, 2025
…thonGH-134841) Skip the test if the Python UTF-8 Mode is enabled and the LC_CTYPE encoding is not UTF-8. (cherry picked from commit 4635115) Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner
added a commit
that referenced
this issue
May 28, 2025
…4843) gh-133711: Fix test_regrtest for PYTHONUTF8=1 (GH-134839) Use "backslashreplace" error handler to decode stdout and stderr. Example: vstinner@WIN C:\victor\python\main\build\test_python_worker_8360\x91> "C:\victor\python\main\PCbuild\amd64\python_d.exe" -m test --fast-ci --slow-ci --testdir C:\Users\vstinner\AppData\Local\Temp\tmp0t59e8da test_regrtest_noop1 test_regrtest_noop2 test_regrtest_noop3 test_regrtest_noop4 Notice the "\x91" byte at the end of the first line: it's the non-ASCII U+00E6 character encoded to the OEM cp437 code page. (cherry picked from commit 9161827) Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner
added a commit
that referenced
this issue
May 28, 2025
…4842) gh-133711: Fix test_regrtest for PYTHONUTF8=1 (GH-134839) Use "backslashreplace" error handler to decode stdout and stderr. Example: vstinner@WIN C:\victor\python\main\build\test_python_worker_8360\x91> "C:\victor\python\main\PCbuild\amd64\python_d.exe" -m test --fast-ci --slow-ci --testdir C:\Users\vstinner\AppData\Local\Temp\tmp0t59e8da test_regrtest_noop1 test_regrtest_noop2 test_regrtest_noop3 test_regrtest_noop4 Notice the "\x91" byte at the end of the first line: it's the non-ASCII U+00E6 character encoded to the OEM cp437 code page. (cherry picked from commit 9161827) Co-authored-by: Victor Stinner <vstinner@python.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
type-feature
A feature request or enhancement
Uh oh!
There was an error while loading. Please reload this page.
Feature or enhancement
Proposal:
See PEP 686
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
PEP 686, approved for Python 3.15.
Linked PRs
The text was updated successfully, but these errors were encountered: