Skip to content

fix(config): preserve UTF-8 CLI JSON on Windows - #303

Merged
3aKHP merged 1 commit into
mainfrom
hotfix/windows-config-cli-encoding
Oct 14, 2026
Merged

3aKHP merged 1 commit into
mainfrom
hotfix/windows-config-cli-encoding

Conversation

@3aKHP

@3aKHP 3aKHP commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

Windows 懒人包首次初始化已完成数据库写入,但输出包含中文的配置 JSON 时,嵌入 Python 对重定向 stdout 使用 cp1252,导致 UnicodeEncodeError 并中止启动。失败记录:发行 run 38545880642。

配置 CLI 模块入口统一将 stdout 和 stderr 设为 UTF-8,保留可读中文 JSON。新增实际子进程回归,在 cp1252/关闭 UTF-8 默认模式的环境下,分别验证初始化成功结果和未初始化错误结果;Windows 生命周期 CI 同时运行这两项。修复说明汇入 1.16.2 CHANGELOG 并同步 self-docs。

本地完整回归 3070 项、配置相关测试 32 项、Ruff、前端 type-check、13 份 TOML 与 52 份 self-docs 同步检查通过。独立 Tier 1 审阅通过,无 Blocking/Should-fix/Nits;独立复现基线 cp1252 下 init 的 UnicodeEncodeError,并通过修订后的真实子进程用例。最终 Windows/常规 CI:run 38547026531。KHPilot 按维护者既有授权跳过。

维护者已授权继续完成 1.16.2 全流程,并允许重建其 Tag 和镜像。本修复已在四项 CI 和独立审阅通过后合并。最终 main CI 与发行 workflow 全部通过;重建后的 Tag 指向 710f09e022afd2ff41eaef5e607eab37d4e4950c。Release v1.16.2 已发布,Windows ZIP 的 digest、安装版本与关键文件,以及镜像的 revision/digest 和发布说明核对一致。

CHANGELOG 草稿:配置 CLI 统一输出 UTF-8 JSON,修复 Windows 重定向中文结果时的编码错误。

Configure the CLI process streams as UTF-8 so redirected Chinese JSON does not fail under cp1252.

Exercise real CLI success and error output in subprocess regressions and Windows CI, and include the fix in v1.16.2 release notes.
@3aKHP
3aKHP merged commit 710f09e into main Oct 14, 2026
4 checks passed
@3aKHP
3aKHP deleted the hotfix/windows-config-cli-encoding branch October 14, 2026 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant