Commit c6c95dc
committed
fix: set UTF-8 input encoding for Windows stdin reading
On Windows systems with a non-UTF-8 system codepage, [Console]::In.ReadToEnd()
decodes UTF-8 stdin using the system codepage instead of UTF-8. This corrupts
non-ASCII characters and breaks JSON parsing for hooks that receive non-ASCII
data (e.g. PreToolUse with AskUserQuestion containing non-English text).
Fix: set [Console]::InputEncoding to UTF-8 before reading stdin.1 parent dd140d4 commit c6c95dc
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1654 | 1654 | | |
1655 | 1655 | | |
1656 | 1656 | | |
| 1657 | + | |
1657 | 1658 | | |
1658 | 1659 | | |
1659 | 1660 | | |
| |||
0 commit comments