Non-ASCII UTF-8 characters (e.g. ç) don't work in interactive TUI on Linux

Resolved 💬 2 comments Opened Apr 26, 2026 by wl5e Closed May 30, 2026

Platform: Linux (Arch), KDE Wayland, WezTerm
Claude Code version: 2.1.119
Keyboard layout: Swiss French (ch, fr variant) — ç = Shift+4

Bug

In interactive mode (TTY), typing or pasting non-ASCII multi-byte UTF-8 characters like ç (U+00E7, bytes 0xC3 0xA7) has no effect in the input field. The character simply doesn't appear.

Confirmed not a terminal issue

Tested in Warp and WezTerm. Character works fine in the shell (zsh). Paste (Ctrl+Shift+V) also fails.

Root cause (from binary analysis)

Claude Code's binary (Bun 1.3.13 runtime) skips setEncoding('utf8') when stdin is a TTY:

if (!N || N.isTTY) return;
if (typeof N.setEncoding === "function") N.setEncoding("utf8");

Bun's readline then fails to assemble multi-byte UTF-8 keypress events correctly in raw mode — the bytes are received but the keypress event is never emitted.

Workaround

Non-TTY mode works correctly:

echo "message avec ç" | claude --print

Expected

ç (and other multi-byte UTF-8 characters) should be insertable in the interactive prompt.

View original on GitHub ↗

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