You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PowerShell 5.1 on Windows defaults to Windows-1252 (ANSI) encoding for BOM-less files. When UTF-8 source files pass through the PowerShell pipeline, multi-byte sequences (e.g. em dash — = 0xE2 0x80 0x94) get misinterpreted as Windows-1252 then re-encoded as CJK mojibake.
This corrupts docstring comments and markdown files without affecting code functionality, making it invisible to CI until editors display the garbage characters.
5-Layer Defense (discovered and implemented in PR #339)
Layer
Defense
Mechanism
One-time?
L5
CI Mojibake Check
Byte-level non-ASCII scan on .py/.ts files
Per CI run
L4
Pipeline encoding
Out-File / ConvertFrom-Json with explicit -Encoding utf8
The upstream CI workflow triggers on pull_request but does not report status back to fork PRs. All 20+ Rhino Bird participants' PRs show zero CI checks on the PR page.
Question Category | 问题类别
Compatibility / Integration | 兼容性 / 集成确认
Your Question | 你的问题
Problem
PowerShell 5.1 on Windows defaults to Windows-1252 (ANSI) encoding for BOM-less files. When UTF-8 source files pass through the PowerShell pipeline, multi-byte sequences (e.g. em dash
—=0xE2 0x80 0x94) get misinterpreted as Windows-1252 then re-encoded as CJK mojibake.This corrupts docstring comments and markdown files without affecting code functionality, making it invisible to CI until editors display the garbage characters.
5-Layer Defense (discovered and implemented in PR #339)
Implementation
.github/workflows/pr-ci.yml— Encoding Defense (L1+L5) jobscripts/harden-workspace-encoding.ps1— apply with-Apply, verify with-CheckRoot Cause Reference
Relates to
Context / Background | 背景信息
No response
Expanded: Broader CI infrastructure gap
This issue was originally filed about encoding defense, but investigation revealed a broader infrastructure problem affecting all fork PRs.
Current upstream CI status (
.github/workflows/pr-ci.ymlonmain)Cross-fork PR CI reporting
The upstream CI workflow triggers on
pull_requestbut does not report status back to fork PRs. All 20+ Rhino Bird participants' PRs show zero CI checks on the PR page.Impact
Suggested fix
pr-ci.ymlintomainthat includes Test TS + Test Python jobsRef: PR #339 demonstrates a fully working CI pipeline with all 8 jobs passing.