mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-09 09:11:00 +08:00
PowerShell 5.1 encodes stdout for a native-process pipe in the console OEM codepage, so raw search content containing characters the inherited CP cannot carry (Cyrillic under CP437/850, ...) reached collect_grep_matches as '?' — and whether it degraded depended entirely on which console the server happened to inherit. That surfaced as the intermittent test_mcp raw-Русский mojibake on the windows CI leg and means real Windows users in a default console get '?' for all non-ASCII search_code raw content. Every generated command now pins [Console]::OutputEncoding to UTF-8, so the pipe is codepage-independent by construction. The read side needs no pin: Select-String decodes BOM-less UTF-8 via .NET StreamReader defaults. A Windows-side builder test asserts all five command variants carry the prelude. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>