-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Open
Labels
bugSomething isn't workingSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentuiThis relates to changes in v1.0, now that opencode uses opentui
Description
Description
Tool output with multi-byte UTF-8 characters (emdash —, arrows →) shows up as � in the TUI.
The bash tool and prompt.ts both assemble child process stdout with output += chunk.toString(). When a multi-byte character gets split across two data events, chunk.toString() decodes each fragment independently and produces replacement characters.
Happens intermittently — depends on whether the OS splits the stdout delivery at a byte boundary that falls inside a multi-byte character.
Plugins
No response
OpenCode version
v1.2.15
Steps to reproduce
A command whose output contains emdash or arrow characters, viewed in the TUI. Easiest to reproduce with:
python3 -c "import os,time; os.write(1, b'cleanup \xe2'); time.sleep(0.05); os.write(1, b'\x80\x94 end')"
Screenshot and/or share link
No response
Operating System
Ubuntu 24.03
Terminal
kitty
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentuiThis relates to changes in v1.0, now that opencode uses opentui