[PR #4207] [MERGED] port_publish: read gh's and Kira's output as UTF-8 #5487

Closed
opened 2026-11-03 05:12:55 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4207
Author: @GIGABAIT93
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @rdbtCVS

Base: main ← Head: fix/port-publish-utf8


📝 Commits (1)

  • 6ffe364 port_publish: read gh's and Kira's output as UTF-8

📊 Changes

2 files changed (+14 additions, -2 deletions)

View changed files

📝 tests/test_port_publish.py (+11 -0)
📝 tools/port_publish.py (+3 -2)

📄 Description

🤖 Opened by GIGABAIT93's AI agent (Claude Code, Claude Opus 5.5), not by GIGABAIT93 directly.

What

This follows up d3grando's review on #3587, which merged before the last point was fixed. The roadmap.py half is on main already (479f53624). This is the port_publish.py half.

gh() and kira() ran subprocess.run(..., text=True) with no encoding. gh and node print UTF-8, but on Windows Python decodes it with the code page. open_version_port_issues reads bodies with →, which come back as →. merged() keeps the head and tail of the body, so the next update writes the mojibake back, now as valid UTF-8. Both calls now pass encoding="utf-8". issue() already writes the body file as UTF-8.

The test test_gh_and_kira_read_utf8_whatever_the_code_page fakes subprocess.run so it decodes the UTF-8 output with cp1252 when no encoding is given, as Windows does. Before the fix it failed with 'a → b' != 'a → b', and now it passes.

pr_ready (tools/pr_ready.py --quick --base upstream/main on GIGABAIT, against upstream/main at 68f036059, 26 s)

Check Result
Scope ✅ 2 files, +14 −2
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 481 passed (26 s)
rustfmt ➖ no Rust change
clippy ➖ no Rust change
tests ➖ no crate touched
doc tests ➖ no crate touched
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label skip-release

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/4207 **Author:** [@GIGABAIT93](https://github.com/GIGABAIT93) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/port-publish-utf8` --- ### 📝 Commits (1) - [`6ffe364`](https://github.com/horizon-rust/horizon/commit/6ffe36494e1f8d943f21659505ead602ca17db75) port_publish: read gh's and Kira's output as UTF-8 ### 📊 Changes **2 files changed** (+14 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_port_publish.py` (+11 -0) 📝 `tools/port_publish.py` (+3 -2) </details> ### 📄 Description > 🤖 Opened by GIGABAIT93's AI agent (Claude Code, Claude Opus 5.5), not by GIGABAIT93 directly. ## What This follows up d3grando's review on #3587, which merged before the last point was fixed. The `roadmap.py` half is on main already (479f53624). This is the `port_publish.py` half. `gh()` and `kira()` ran `subprocess.run(..., text=True)` with no encoding. gh and node print UTF-8, but on Windows Python decodes it with the code page. `open_version_port_issues` reads bodies with `→`, which come back as `→`. `merged()` keeps the head and tail of the body, so the next update writes the mojibake back, now as valid UTF-8. Both calls now pass `encoding="utf-8"`. `issue()` already writes the body file as UTF-8. The test `test_gh_and_kira_read_utf8_whatever_the_code_page` fakes `subprocess.run` so it decodes the UTF-8 output with cp1252 when no encoding is given, as Windows does. Before the fix it failed with `'a → b' != 'a → b'`, and now it passes. **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on GIGABAIT, against upstream/main at 68f036059, 26 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +14 −2 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 481 passed (26 s) | | rustfmt | ➖ no Rust change | | clippy | ➖ no Rust change | | tests | ➖ no crate touched | | doc tests | ➖ no crate touched | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | `skip-release` | 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:12:55 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#5487
No description provided.