[BUG] Tables with CJK characters are misaligned in terminal output

Resolved 💬 5 comments Opened Dec 9, 2025 by guppy-jpf Closed Feb 6, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When Claude Code generates tables containing CJK (Chinese, Japanese, Korean) characters, the columns are misaligned in terminal output. Claude does not account for the display width of CJK characters (2 terminal columns) versus ASCII characters (1 column).

Example request:
Create a reference table for the following mobile app error codes. Include columns for: error code, Japanese message, English message, and the screen where it appears.

  • E001: ログインに失敗しました / Login failed / LoginScreen
  • E002: ネットワーク接続エラー / Network connection error / anywhere
  • E003: セッションがタイムアウトしました / Session timed out / all authenticated screens
  • E004: データの読み込みに失敗しました / Failed to load data / HomeScreen, SettingsScreen
  • E005: アプリバージョンが古いです。アップデートしてください / App version outdated. Please update. / LaunchScreen
  • E006: 無効なユーザーIDまたはパスワード / Invalid user ID or password / LoginScreen
  • E007: サーバーメンテナンス中 / Server maintenance in progress / all screens

Claude produces:

| Error Code | Japanese Message           | English Message                      | Screen                     |
|------------|----------------------------|--------------------------------------|----------------------------|
| E001       | ログインに失敗しました                | Login failed                         | LoginScreen                |
| E002       | ネットワーク接続エラー                | Network connection error             | anywhere                   |
| E003       | セッションがタイムアウトしました           | Session timed out                    | all authenticated screens  |
| E004       | データの読み込みに失敗しました            | Failed to load data                  | HomeScreen, SettingsScreen |
| E005       | アプリバージョンが古いです。アップデートしてください | App version outdated. Please update. | LaunchScreen               |
| E006       | 無効なユーザーIDまたはパスワード          | Invalid user ID or password          | LoginScreen                |
| E007       | サーバーメンテナンス中                | Server maintenance in progress       | all screens                |

The column separators (|) do not align vertically.

What Should Happen?

Claude should calculate display width correctly:

  • CJK characters = 2 terminal columns each
  • ASCII characters = 1 terminal column each

Then pad cells to ensure consistent display width per column, producing aligned output.

Error Messages/Logs

(no error - just visual misalignment)

Steps to Reproduce

  1. Ask Claude Code to create a markdown table with Japanese/Chinese/Korean text in one column and English in another, or mixed ASCII / CJK characters within one or more columns. See example above.
  2. Observe that the | column separators do not align vertically

<img width="1498" height="524" alt="Image" src="https://github.com/user-attachments/assets/92a19839-f0a9-4841-9c70-8a3433bca2a2" />

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

i don't recall this being broken before, but it may have always been this way; i just noticed it this week ...

Claude Code Version

Claude Code v2.0.61

Platform

Google Vertex AI

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Although this can (unreliably) be worked around by adding (many lines of) new instructions to CLAUDE.md, or possibly by creating an external tool for CJK formatting and trying to get the tool to use it in this context, this is something that users shouldn't have to waste time customizing ...

(the below generated by claude)

Severity: This required approximately 10 correction attempts during a single conversation before Claude produced a correctly aligned table. The user had to explain
display width concepts and debug the padding character by character.

Root causes identified:

  1. Claude treats all characters as 1 column wide
  2. When attempting to add padding, Claude miscounts or uses inconsistent padding characters
  3. Claude does not distinguish between ASCII spaces (1 col) and full-width spaces (2 cols)

Proposed solution: Add to Claude Code's system instructions or model behavior:

  1. When generating tables with CJK content, calculate display width (2 for wide chars, 1 for narrow)
  2. Use full-width spaces (U+3000) for padding CJK columns
  3. Ensure separator row dash count equals target display width
  4. Output tables in fenced code blocks to preserve spacing

Reference: Unicode Standard Annex #11 (East Asian Width) defines character width properties.

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗