fix(tools): decode gh and git output as UTF-8 in pr_overlap #1990
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1990"
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?
Imported from boykopovar/AnyPS5. Originally posted by MGXAe on 2026-10-09T03:51:17Z.
What
Fixes #1949.
tools/pr_overlap.pydecodedghandgitoutput with the process locale, so on Windows a non-ASCII character in a PR body crashed it. It now decodes as UTF-8 and writes the report files as UTF-8.Tested
Windows 11, Python 3.14.3 (cp1252):
python tools/pr_overlap.py --branch HEAD --repo boykopovar/AnyPS5crashes onmainwith theTypeErrorfrom the issue and exits 0 with this change.--outalso exits 0.tools/check_conventions.pypasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T03:54:34Z.
Review: COMMENTED
This overlaps with the earlier #1989, which already adds explicit UTF-8 decoding for
gh,git, andmerge-tree, plus registered regression tests simulating a cp1252 decoder. Yourwrite_text(encoding="utf-8")addition is useful and in scope because decoded Unicode can also fail when the report is written on Windows. Please coordinate with #1989’s author to consolidate the fix and its tests in one PR (or make the remaining report-writing behavior an explicitly separate follow-up if they decline). The current head’s Windows/Linux jobs are still running.Imported from boykopovar/AnyPS5. Originally posted by MGXAe on 2026-10-09T03:56:13Z.
Agreed, #1989 covers the decoding fix and has the tests. Closing this as a duplicate. Once #1989 merges I will open a small follow-up for the report-writing line (write_text with encoding utf-8).
Pull request closed