termly-cli icon indicating copy to clipboard operation
termly-cli copied to clipboard

CJK/Chinese Text Display Truncation Issue in Terminal UI (Only Left Half Visible)

Open zhouyanbl opened this issue 10 months ago • 1 comments

Image

Environment

  • Version: v1.7.0
  • Platform: iOS (mobile) 26.1
  • opencode
  • mac mini
  • terminal: xterminal

Problem

When displaying Chinese (or other CJK) characters in the terminal interface, the text is rendered incompletely, with only the left portion of each character visible. This makes the text unreadable and significantly impacts usability for non-English users.

Steps to Reproduce

  1. Establish a session in the terminal for opencode.
  2. Output or input text containing Chinese characters.
  3. Observe that the characters are horizontally truncated, showing only the left half.

Expected Behavior

Chinese/CJK characters should be rendered completely and legibly, with their full width visible, similar to how ASCII characters are displayed.

Additional Context

This issue appears to be related to incorrect character cell width calculation for double-width CJK characters. The terminal UI may be allocating the same horizontal space for CJK characters as it does for ASCII characters, which is insufficient.

zhouyanbl avatar Jan 29 '26 07:01 zhouyanbl

Hi @zhouyanbl ,

Thank you for reporting the issue.

I will upload the new version of app to App Store today.

It should be available pretty soon

sprotasovitsky avatar Feb 06 '26 10:02 sprotasovitsky