Skip to content

Thai language output renders incompletely in Copilot CLI #2521

@iloveboom

Description

@iloveboom

Describe the bug

Copilot CLI has an issue rendering Thai language output. When the response contains Thai text, some lines render incompletely or appear truncated.

This does not seem to be tied to a single terminal app or font setting. I was able to reproduce it consistently in different terminal environments, and changing fonts did not fix it. I also tested with plain terminal settings, but the issue remained.

Since Thai output renders correctly in other tools on the same machine, this seems likely to be a Copilot CLI text rendering, wrapping, or redraw issue.

Affected version

GitHub Copilot CLI 1.0.18

Steps to reproduce the behavior

  1. Start Copilot CLI
  2. Enter this prompt:
Give me 5 best practices for writing clean Python code in Thai.
  1. Observe the output

Expected behavior

Thai text should render completely and correctly.

Example of complete output:

5 แนวทางปฏิบัติที่ดีที่สุดสำหรับการเขียน Python ที่สะอาด

 1. ตั้งชื่อให้มีความหมาย (Meaningful Naming)
 ใช้ชื่อตัวแปรและฟังก์ชันที่สื่อความหมายชัดเจน เช่น user_age แทน x หรือ calculate_total_price() แทน calc()
 2. ปฏิบัติตาม PEP 8
 ใช้มาตรฐานการจัดรูปแบบโค้ดของ Python เช่น เว้นวรรค 4 ช่อง, ใช้ snake_case สำหรับตัวแปร และ PascalCase สำหรับ class
 3. เขียนฟังก์ชันให้ทำสิ่งเดียว (Single Responsibility)
 แต่ละฟังก์ชันควรทำหน้าที่เดียวและทำได้ดี หากฟังก์ชันยาวเกิน 20-30 บรรทัด ควรพิจารณาแยกออก
 4. เขียน Docstring และ Comment อย่างมีประสิทธิภาพ
 อธิบายว่าโค้ด ทำไม ไม่ใช่ ทำอะไร และใช้ docstring สำหรับ function/class เพื่อให้ help() ใช้งานได้
 5. จัดการ Exception อย่างเหมาะสม
 หลีกเลี่ยง except: แบบกว้างๆ ควรระบุ exception ที่เฉพาะเจาะจง เช่น except ValueError: และส่ง error message ที่เป็น

Actual behavior

Some lines containing Thai text are incomplete or appear cut off/truncated when displayed in Copilot CLI.

Example of how it appears on screen:

5 แนวทางปฏิบัติที่ดีที่สุดสำหรับการเขียน P

 1. ตั้งชื่อให้มีความหมาย (Meaningful N
 ใช้ชื่อตัวแปรและฟังก์ชันที่สื่อความหมายชัดเจน เช่น user_age แทน x หรือ calculate_total_pric
 2. ปฏิบัติตาม PE
 ใช้มาตรฐานการจัดรูปแบบโค้ดของ Python เช่น เว้นวรรค 4 ช่อง, ใช้ snake_case สำหรับตัวแปร และ PascalCase
 3. เขียนฟังก์ชันให้ทำสิ่งเดียว (Single Respon
 แต่ละฟังก์ชันควรทำหน้าที่เดียวและทำได้ดี หากฟังก์ชันยาวเกิน 20-30 บรรทั
 4. เขียน Docstring และ Comment อย่างมีประสิท
 อธิบายว่าโค้ด ทำไม ไม่ใช่ ทำอะไร และใช้ docstring สำหรับ function/class เพื่อให้ h
 5. จัดการ Exception อย่างเหมาะ
 หลีกเลี่ยง except: แบบกว้างๆ ควรระบุ exception ที่เฉพาะเจาะจง เช่น except ValueError: และส่ง error message ที

However, if I copy the output text, the copied text is complete. This suggests the full text is present but the on-screen rendering is incorrect.

Additional context

  • Reproduced consistently in multiple terminal environments
  • Changing fonts did not help
  • Running with plain terminal settings did not help:
NO_COLOR=1 CLICOLOR=0 TERM=dumb copilot
  • If I copy the output text, the copied text is complete even when the on-screen rendering looks incomplete

This may be related to Thai Unicode rendering, combining characters, or width calculation in Copilot CLI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions