fix(tools): decode overlap command output as UTF-8 #1989
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1989"
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 yeahboi233 on 2026-10-09T03:45:18Z.
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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T03:54:32Z.
Review: COMMENTED
I found the concurrent #1990, which covers the same
tools/pr_overlap.pyUTF-8 decoding fix and also setsencoding="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.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T03:58:53Z.
Review: COMMENTED
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.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T08:53:02Z.
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
f145139676a48306681d3a4d5fabf83938759daf, while current upstreammainis6cc0503dacc9d9697d23001d4103780ad2e9acba. Please rebase onto currentmainand rerun the checks on the rebased head before merge.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T09:14:23Z.
Contribution-rule follow-up: upstream
mainhas advanced tod9484c719b2a5ac6201e27f8657e0fb0f01e648csince my previous note. This PR is still based onf145139676a48306681d3a4d5fabf83938759daf, so please rebase onto the currentmainand rerun checks on the rebased head. Under the now-merged #2113 CI policy, Conventions and eligible relinker jobs run automatically; a full Linux/Windows Build must be started by an upstream collaborator frommainwith this PR number.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T09:42:33Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)CMakeLists.txtL39