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
{{ message }}
Repository navigation
run_cmd decodes command output with the locale encoding (cp1252 on Windows) #18
run_cmd calls subprocess.run(..., capture_output=True, text=True) without encoding=, so output is decoded with the locale's preferred encoding. On Windows with Python 3.14 that's cp1252. (UTF-8 mode only becomes the default in 3.15, per PEP 686.)
npm, Vite and mkc write UTF-8. cp1252 leaves bytes 0x81, 0x8D, 0x8F, 0x90 and 0x9D undefined, so UTF-8 output containing them raises UnicodeDecodeError. That happens when the output is decoded after the process exits, so a command that succeeded is reported as a crash, and a failing command's real output is lost.
Checked by decoding the UTF-8 bytes as cp1252 in Python:
←, ❌, ‐ (U+2010) and 🐉 raise UnicodeDecodeError.
✓ only comes out garbled, which is likely why the Windows CI jobs pass today.
mkc repeats identifiers and string literals from the game's own code in TypeScript errors, so game content can trigger this, not just tool output.
Not reproduced on a Windows machine; this follows from the decoding behavior above.
Expected behavior: decode command output as UTF-8 with errors="replace", matching the earlier fix that made all text file I/O in src/ use encoding="utf-8".
Found while reviewing PR #7, toolchain at ce12c48.
changed the title [-][P2] run_cmd decodes command output with the locale encoding (cp1252 on Windows)[/-][+]run_cmd decodes command output with the locale encoding (cp1252 on Windows)[/+]on Nov 4, 2026
Activity
[-][P2] run_cmd decodes command output with the locale encoding (cp1252 on Windows)[/-][+]run_cmd decodes command output with the locale encoding (cp1252 on Windows)[/+]Show the output of failed mkc and npm commands