v2.16.1 fixed the output pipe encoding but missed the read side.
Get-Content without -Encoding in PS5 reads files with the system ANSI
code page (Windows-1252), corrupting non-ASCII characters in
task_plan.md and SKILL.md before they reach the output pipe.
Changes to pre-tool-use.ps1, session-start.ps1, agent-stop.ps1:
- All Get-Content calls: added -Encoding UTF8
- [System.Text.Encoding]::UTF8 replaced with
[System.Text.UTF8Encoding]::new($false) — UTF-8 without BOM,
preventing stray 0xEF 0xBB 0xBF preamble in JSON output
Closes#82
PowerShell scripts (all 4):
- Add $OutputEncoding and [Console]::OutputEncoding = UTF8 before any output
- Fixes diamond replacement characters (◆) caused by PowerShell 5.x
defaulting to UTF-16LE stdout — Copilot reads stdout as UTF-8, causing
the byte mismatch that produces garbled output on Windows systems
Bash scripts (session-start.sh, pre-tool-use.sh):
- Use json.dumps(..., ensure_ascii=False) instead of default ensure_ascii=True
- Preserves UTF-8 characters (CJK, emojis, accented letters) in task_plan.md
context instead of converting them to raw \uXXXX escape sequences
README:
- Move Contributors from ugly bottom section into collapsible near top
- Add full contributors table with all PR authors since v2.8.0
- Add @Hexiaopi for Issue #82 bug report
- Update version badge and releases table to v2.16.1
CHANGELOG: add [2.16.1] entry
Fixes#82 — reported by @Hexiaopi