rdna2_tools_check: test_cli_scanner fails when PYTHONIOENCODING=utf-8 on a non-UTF-8 code page #844
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#844
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@lukaslw-lab on GitHub · 2026-11-23 11:56 UTC · original
AI-assisted (Claude Code).
Commit or build
42154de(branch onmainc3db335;tests/rdna2_tools_check.pyandtools/scan_unsupported_shaders.pyare unchanged frommain)Reproduction
Expected behavior
Pass, as it does with the variable unset.
Observed behavior
test_cli_scannererrors. The reader thread raisesUnicodeDecodeError: 'charmap' codec can't decode byte 0x88 in position 244,res.stdoutisNone, andassertInat line 2464 raisesTypeError.Cause: with
PYTHONIOENCODING=utf-8the scanner's stdout is UTF-8, somake_progress_bar(encoding check from #241) prints█(E2 96 88). The test runs it withtext=Trueand noencoding, so the parent decodes in the locale encoding (cp1250 here). Both scanner calls intest_cli_scannerare affected.Suggested fix: pass
encoding="utf-8"andenv={**os.environ, "PYTHONIOENCODING": "utf-8"}to both calls, so the two sides agree whatever the caller's environment. #635 fixed the same class of issue fordependency_paths.py.Environment
Windows 10 22H2 (19045), ANSI code page 1250, Python 3.13.7.
Checklist