Skip to content

Table column alignment broken with CJK (Chinese/Japanese/Korean) characters #670

@Pull2MAX

Description

@Pull2MAX

Description

When the AI response contains a Markdown table with CJK (Chinese/Japanese/Korean) characters, the column alignment is completely broken in the terminal output.

Environment

  • OS: Windows 11
  • Terminal: PowerShell
  • Factory version: latest

Screenshot

Root Cause (likely)

The table rendering logic probably calculates column widths based on character count (str.len() or similar) rather than terminal display width. CJK characters are fullwidth and occupy 2 columns in a monospace terminal, but are often counted as 1 character.

Suggested Fix

Use a Unicode-aware width calculation library (e.g. unicode-width crate in Rust, string-width in Node.js) to compute the actual display width of each cell before padding.

Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions