Description
Description
When copying Japanese text directly from the chat output in OpenCode, the text becomes mojibake. The same text displays correctly on screen, but becomes corrupted only when copied to the clipboard.
This issue appears to be specific to the copy operation within the OpenCode UI.
Steps to Reproduce
- Open OpenCode and interact with the AI in Japanese.
- Ask the AI to output Japanese text (e.g. a commit message, PR title, or code comment).
- Select the Japanese text from the chat output and copy it (using mouse selection or any built-in copy functionality).
- Paste the text into any application (terminal, editor, etc.).
Expected Behavior
The Japanese text should be copied correctly as UTF-8.
Example of correct text:
feat(calendar): 日詳細ボトムシート(P3)を追加
Actual Behavior
The copied text is garbled. It appears that the UTF-8 byte sequence is being misinterpreted as ISO-8859-1 / Windows-1252.
Example of actual copied result:
feat(calendar): æ¥è©³ç´°ããã ã·ã¼ãï¼P3ï¼ã追å
Environment
- OpenCode version: 1.15.12
- OS: macOS
- Terminal / Environment: VS Code integrated terminal
- Locale: Japanese (Japan)
- How you are copying: Mouse drag selection
Additional Context
- The text renders correctly in the OpenCode chat UI.
- Copying the same Japanese text from other sources (files, browser, other applications) works normally.
- This only occurs when copying text that was output by the AI inside OpenCode.
- Related issues that may be connected:
This seems to be a problem in the clipboard / text extraction layer rather than the rendering layer.
Plugins
No response
OpenCode version
1.15.12
Steps to reproduce
- Open OpenCode and interact with the AI in Japanese.
- Ask the AI to output Japanese text (e.g. a commit message, PR title, or code comment).
- Select the Japanese text from the chat output and copy it (using mouse selection or any built-in copy functionality).
- Paste the text into any application (terminal, editor, etc.).
Screenshot and/or share link
No response
Operating System
macOS 26.5
Terminal
VS Code integrated terminal
Description
Description
When copying Japanese text directly from the chat output in OpenCode, the text becomes mojibake. The same text displays correctly on screen, but becomes corrupted only when copied to the clipboard.
This issue appears to be specific to the copy operation within the OpenCode UI.
Steps to Reproduce
Expected Behavior
The Japanese text should be copied correctly as UTF-8.
Example of correct text:
Actual Behavior
The copied text is garbled. It appears that the UTF-8 byte sequence is being misinterpreted as ISO-8859-1 / Windows-1252.
Example of actual copied result:
Environment
Additional Context
This seems to be a problem in the clipboard / text extraction layer rather than the rendering layer.
Plugins
No response
OpenCode version
1.15.12
Steps to reproduce
Screenshot and/or share link
No response
Operating System
macOS 26.5
Terminal
VS Code integrated terminal