tools: pr_overlap crashes on Unicode PR metadata on Windows #1949
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?
Imported from boykopovar/AnyPS5. Originally posted by arcwiser on 2026-10-09T01:45:40Z.
What
Running the documented overlap checker on Windows can crash before it compares any branches when an open pull-request body contains a character that is not representable in the active legacy code page.
ghemits UTF-8, butsubprocess.run(..., text=True)ingh()decodes with the process locale (cp1252 here).Observed from current
mainwhile checking branch3058b519:Command:
Setting
PYTHONUTF8=1makes the same command complete. The tool should explicitly decodeghoutput as UTF-8 instead of depending on the caller's locale. Git output may need the same treatment for Unicode paths or commit data.I did not open a patch because PR #1741 already edits
tools/pr_overlap.py; this should be handled there or in a follow-up after it merges to avoid conflicting work.Environment: Windows, Python 3.10.11, active code page behavior cp1252.
AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T03:56:16Z.
Two PRs now address this issue: #1989 adds explicit UTF-8 decoding for
gh,git, andmerge-treeplus registered cp1252 regression tests; #1990 makes the same decoding change and also writes report files as UTF-8. I asked both authors to coordinate so the regression coverage and report-writing fix land together in one PR. #1990’s Windows job and conventions pass; its Linux job is still running. #1989 currently has no reported checks.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T09:47:10Z.
The deferred report-writing follow-up is now in #2134. It sets
encoding="utf-8"for--outreport files and extends the existingpr_overlap_encodingregression suite. The check passes on Linux and directly asserts the encoding argument, so it covers the Windows code-page requirement; native Windows execution is still unverified.