fix(pty): Add UTF-8 encoding defaults for Windows PTY#11459
Merged
adamdotdevin merged 1 commit intoanomalyco:devfrom Jan 31, 2026
Merged
fix(pty): Add UTF-8 encoding defaults for Windows PTY#11459adamdotdevin merged 1 commit intoanomalyco:devfrom
adamdotdevin merged 1 commit intoanomalyco:devfrom
Conversation
Set LC_ALL, LC_CTYPE, and LANG environment variables to C.UTF-8 on Windows platform to fix Chinese character display issues in terminal. Related issues: - anomalyco#9793: Chinese characters displayed as garbled text in CLI mode - anomalyco#9790: Process killed with garbled output when dragging terminal window - anomalyco#9787: Occasional process killed with garbled output - anomalyco#8410: TUI icons show as garbage characters on Windows 10 - anomalyco#7891: OpenCode TUI Chinese Text Display Issue Related PR: anomalyco#10489
Contributor
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Contributor
|
The following comment was made by an LLM, it may be inaccurate: No duplicate PRs found |
Contributor
Author
|
Fixes #9793 |
alexyaroshuk
pushed a commit
to alexyaroshuk/opencode
that referenced
this pull request
Feb 1, 2026
athal7
pushed a commit
to athal7/opencode
that referenced
this pull request
Feb 1, 2026
ishaksebsib
pushed a commit
to ishaksebsib/opencode
that referenced
this pull request
Feb 4, 2026
ishaksebsib
pushed a commit
to ishaksebsib/opencode
that referenced
this pull request
Feb 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix Chinese Character Display Issues in Windows PTY
Problem Description
This PR fixes issue #9793 where Chinese characters are displayed as garbled text in CLI mode on Windows terminals.
Fixes #9793
Root Cause
The Windows PTY process was missing UTF-8 encoding environment variables, causing CJK characters to render incorrectly.
Solution
Set UTF-8 encoding environment variables for Windows platform:
Related Issues
Related PR
Changes
Testing
Test Chinese character display in Windows PowerShell terminal to verify the fix works correctly.