Skip to content

fix(cli): set UTF-8 code page on Windows to fix garbled box-drawing characters#912

Open
flobo3 wants to merge 1 commit intoslopus:mainfrom
flobo3:fix/windows-utf8-encoding
Open

fix(cli): set UTF-8 code page on Windows to fix garbled box-drawing characters#912
flobo3 wants to merge 1 commit intoslopus:mainfrom
flobo3:fix/windows-utf8-encoding

Conversation

@flobo3
Copy link

@flobo3 flobo3 commented Mar 24, 2026

Fixes #904

When running happy on Windows, box-drawing and other Unicode characters are rendered as garbled/mojibake text during startup and in the prompt input area. This happens because the Windows console code page defaults to 437 (OEM) or 1252 (Western European) rather than 65001 (UTF-8).

When claude is launched directly, the terminal sets up UTF-8 encoding before spawning the process. However, when happy-coder's Node.js launcher (claude_local_launcher.cjs) spawns Claude in-process via dynamic import, this UTF-8 setup is bypassed.

This PR adds a UTF-8 code page initialization (chcp 65001) in the Windows path of scripts/claude_local_launcher.cjs to ensure multi-byte UTF-8 sequences are interpreted correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Box-drawing characters garbled on Windows (UTF-8 code page not set by launcher)

1 participant