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
[Bug] Garbled CJK characters in OpenCode console due to Windows system default ACP (GBK/CP936) encoding #31187
The OpenCode console inherits the system's default Active Code Page (ACP) encoding in Windows. On Simplified Chinese versions of Windows, the default system ACP is 936 (GBK). New child processes created by OpenCode inherit this encoding setting for standard input and output streams.
When a command-line tool (or child process) outputs text encoded in UTF-8, the parent OpenCode console reads these UTF-8 bytes using the system's default GBK decoder, resulting in garbled characters (mojibake). This issue primarily affects CJK (Chinese/Japanese/Korean) characters, while pure ASCII characters display normally.
the console output: CJK characters are rendered as garbled symbols, while English/ASCII text is displayed correctly.
Root Cause
The child process's standard output is encoded in UTF-8.
The parent OpenCode console uses the system's default GBK (CP936) decoder to interpret the UTF-8 byte stream, causing misinterpretation of multi-byte CJK characters.
Plugins
none
OpenCode version
1.15.13
Steps to reproduce
Run OpenCode in a Simplified Chinese Windows 11 environment with PowerShell 7.
Execute a script/command that outputs UTF-8 encoded text containing CJK characters (e.g., the PowerShell script in the screenshot reading UTF-8 text files).
Observe the console output: CJK characters are rendered as garbled symbols, while English/ASCII text is displayed correctly.
Activity
github-actions commentedon Jun 7, 2026
This issue might be a duplicate of existing issues. Please check:
If your issue is distinct from all of the above, please clarify how it differs. Otherwise, consider adding your context to one of the existing issues.
github-actions commentedon Aug 7, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.