[BUG] Japanese characters displayed as octal escape sequences in @ file mention preview
Environment
- Claude Code version: 2.1.6
- OS: Windows 11 + WSL2 (Linux 6.6.87.2-microsoft-standard-WSL2)
- Terminal: Windows Terminal
- Locale: ja_JP.UTF-8
Description
When using the @ file mention feature in Claude Code CLI, Japanese (and likely other CJK/multibyte UTF-8) characters in file paths are displayed as octal escape sequences instead of the actual characters.
Steps to Reproduce
- Create a file with Japanese characters in the filename, e.g.:
````
touch "Gmailスパム判定の仕組み.md"
- In Claude Code CLI, type
@and start typing the file path - Observe the file preview/suggestion
Expected Behavior
The file path should display Japanese characters correctly:
@10_Notes/20260108_1230_Gmailスパム判定の仕組み_送信者レピュテーションが決め手.md
Actual Behavior
Japanese characters are displayed as octal escape sequences:
@""10_Notes/20260108_1230_Gmail\343\
202\271\343\203\221\343\203\240\345\
210\244\345\256\232\343\201\256\344\
273\225\347\265\204\343\201\277_\351
\200\201\344\277\241\350\200\205\343
\203\254\343\203\224\343\203\245\343
\203\206\343\203\274\343\202\267\343
\203\247\343\203\263\343\201\214\346
\261\272\343\202\201\346\211\213.md"
Technical Analysis
The octal sequences like \343\202\271 correspond to UTF-8 bytes:
\343= 0xE3 (first byte of 3-byte UTF-8 character)\202= 0x82\271= 0xB9- Together: E3 82 B9 = "ス" (Katakana SU)
This suggests the Rust code is using Debug formatting ({:?}) or similar byte-level representation instead of proper UTF-8 string display for the file path preview.
Possible Fix Location
The issue is likely in the @ file autocomplete/preview rendering code where file paths are formatted for terminal display. The code should use Display formatting ({}) or proper UTF-8 string handling instead of Debug formatting.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗