Repository navigation
fix(tools): decode overlap command output as UTF-8 - #1989
Conversation
MarcZX10
left a comment
There was a problem hiding this comment.
I found the concurrent #1990, which covers the same tools/pr_overlap.py UTF-8 decoding fix and also sets encoding="utf-8" when writing per-PR report files. That output-file change belongs to this issue too: once Unicode PR metadata is decoded, writing it with the Windows locale can still fail for characters outside cp1252. Your PR has the stronger registered regression coverage; please coordinate with #1990’s author and consider carrying that one-line report fix here so one PR resolves the complete Windows UTF-8 path.
MarcZX10
left a comment
There was a problem hiding this comment.
Thanks for the consolidation direction: #1990 is now closed as a duplicate. I checked this head’s Actions runs; Build and Conventions are both action_required, so no upstream CI has run yet. This account has read-only permission on the upstream repository and cannot approve those workflows; a maintainer will need to approve them before the review is complete. Please also keep the UTF-8 report-file write as the follow-up promised in #1990 after this PR merges.
|
I reviewed the complete diff and current checks: the UTF-8 decoding change is covered by the registered regression tests, and all reported Linux, Windows, macOS relinker, and conventions checks pass. #1990 is now closed by its author as the duplicate, with the report-file encoding change deferred until this lands. One contribution-rule follow-up: this PR's base is still |
|
Contribution-rule follow-up: upstream |
What
On Windows with a legacy cp1252 locale, the overlap checker decodes the GitHub CLI's UTF-8 output using the host code page. Unicode in a pull-request body can then raise
UnicodeDecodeErrorbefore any branches are compared.Explicitly decode stdout and stderr as UTF-8 in the GitHub CLI, Git and
merge-treesubprocess calls. This preserves Unicode metadata, diff text, conflict paths and error messages while retaining the existing exit-status handling. Fixes #1949.Based on main
f145139676a48306681d3a4d5fabf83938759daf. No open PR implements this decoding fix. #1741 changes export detection in the same file; its complete patch applies cleanly alongside this change, and both test suites pass together. The encoding tests have their own file and CTest registration. There is no dependency on #1741.Tested
macOS 26.6.2, Apple Silicon arm64, AppleClang 21, Python 3.12.14, Release relinker-only build:
pr_overlap_encoding.python tools/check_conventions.py --base origin/mainandgit diff origin/main --checkpass.Native Windows execution has not been verified locally. The tests simulate its legacy code page; no game files or console are required.
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)