GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Docs: subprocess text mode does not say that the default encoding is a guess about the child process · Issue #158633 · python/cpython Open Labels docsDocumentation in the Doc dirDocumentation in the Doc dirtopic-subprocessSubprocess issues.Subprocess issues. DescriptionDocumentation
and, on the Windows specifics:
This is the follow-up issue for that. @kunom, who filed gh-105312, supported it there. What the docs say today
Accurate, and it never says that the default is unrelated to what the child writes, or what the failure looks like when they disagree. Why the failure is hard to attributeMeasured on Windows 11, Python 3.12.8, ANSI code page subprocess.run([sys.executable, "-c", "print('Тест')"], capture_output=True, text=True).stdout # 'Тест' the child wrote UTF-8, text=True decoded cp1251 subprocess.run("echo Тест", shell=True, text=True, stdout=subprocess.PIPE).stdout # '’Ґбв' the child wrote cp866, text=True decoded cp1251 Under UTF-8 mode, which :pep: The traceback for that comes from inside the stream reader rather than from the caller's code, which is what sends people looking for a bug in Proposed changeA Happy to open the PR — a draft is ready and I will link it here. Linked PRsActivity
MetadataMetadataAssigneesLabelsdocsDocumentation in the Doc dirDocumentation in the Doc dirtopic-subprocessSubprocess issues.Subprocess issues. Projects
MilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |