github / github/copilot-cli

CLI looks wrong in xterm with non-UTF charset inside

未關閉
#1,763 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
area:terminal-rendering area:theming-accessibility
主要語言
Shell
星號
11.2k
分支
1.9k
平均合併
14 小時 16 分鐘
30 天內合併 PR
6

描述

### Describe the bug

My `$LANG` is set to `uk_UA.KOI8-U` -- and the fonts I'm using with xterm have the matching encoding (koi8-u). Copilot uses wrong symbols for the pseudo-graphics making the screen rather hard to use. Worse, some character-combinations emitted by the program seem to confuse xterm requiring me to reset it.

### Affected version

unknown (cli-0.0.394)

### Steps to reproduce the behavior

The below instructions use Ukrainian as example, but any non-ASCII and non-UTF `LANG`-setting would demonstrate the same behavior.
1. If you don't already have Cyrillic fonts installed -- the `xlsfonts -fn '*fixed*koi8-*'` prints nothing -- install fonts with koi8-u encoding, such as [these](https://www.freshports.org/x11-fonts/geminifonts).
2. Launch xterm using one of such fonts: `xterm -fn '-gemini-fixed-medium-r-normal--20-200-75-75-c-100-koi8-u'`.
3. Set `LANG` environment variable inside the xterm to `uk_UA.KOI8-U`.
4. Start `copilot`.

### Expected behavior

Expecting lines to be drawn as lines, not as sequences of Cyrillic "Б" (see attached snapshot).

### Additional context

Image

貢獻指南

開啟貢獻指南

研究方向

使用提供的 koi8-u 字型和 LANG=uk_UA.KOI8-U 在 xterm 中重現問題,然後追蹤 CLI 的終端機呈現與字元編碼路徑。確認修正有效,確保偽圖形呈現為線條,且不需要重設即可繼續使用 xterm。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
shell
領域
cli, internationalization
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。