Coding Agents & Terminal · recorded 2026-09-19 · applies to 1 tool(s) ✓ Verified

Problem: Chinese text garbled or untypeable in herdr over SSH (terminal encoding and locale) —— Trove problem library

Verified 2026-08-26Chinese garbled/untypeable in herdr over SSH — this is terminal encoding / remote locale territory; make remote `locale` fully UTF-8 first, then check tmux-like layers. Not reproduced here (no remote session; stated honestly).

Quick fix

# One-liner: in the remote session, ensure a UTF-8 locale, then restart herdr
locale | grep -i utf-8   # every LANG / LC_* should be *.UTF-8
export LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8   # works immediately if the system has a UTF-8 locale generated

What you will run into

When you use herdr over SSH (or run the TUI inside an SSH session), Chinese either shows up garbled or cannot be typed at all. You may suspect a herdr bug, but more likely one hop in the terminal chain is not UTF-8 — from the remote locale to the encoding switch of tmux-like multiplexers.

Why this happens

Conclusion first: any hop in the terminal chain may be non-UTF-8, and herdr is merely the last hop that renders.

Chain: local terminal encoding -> SSH (byte stream; no encoding of its own) -> remote locale (LANG/LC_*) -> terminal multiplexer (tmux/screen UTF-8 switch) -> application (herdr) rendering.

The most common break is the remote locale: when the remote locale prints C/POSIX (typical in containers and minimal installs), wide-character input fails to decode — that is the garbling or dropped input. The second suspect is the multiplexer: tmux negotiates capabilities with the outer terminal, and older configs may leave UTF-8 off.

Measured: this environment has no remote session, so it was not reproduced (stated honestly); the local WSL environment itself is UTF-8 (cli-smoke sessions are normal).

Conclusion: debug from far to near — check whether locale is fully UTF-8, then the tmux-like layer, then local terminal encoding and herdr itself; these three steps cover the vast majority of "Chinese broken over SSH" cases.

Step by step

1. Check the remote locale — Required

In locale output, LANG/LC_* should contain UTF-8 (e.g. LANG=en_US.UTF-8 / zh_CN.UTF-8); C/POSIX means you hit it.

2. Make the SSH session carry a UTF-8 environment — Required

Export a UTF-8 locale in the remote shell config (or pass it through SSH SendEnv/AcceptEnv); on minimal systems, generate zh_CN.UTF-8 or en_US.UTF-8 with localedef / distro tools first.

3. tmux/screen layer — Diagnostic

Under tmux, confirm UTF-8 is enabled (older configs use a status-utf8 option; newer versions negotiate automatically).

4. Tell herdr apart from the terminal — Diagnostic

In the same remote session run echo 中文 or cat a file containing Chinese: if the terminal itself garbles it, it is not a herdr problem.

How to confirm it works

  • echo 中文测试 in the remote session displays correctly;
  • inside the herdr TUI, Chinese characters render and type without loss.

Other environments

  • Containers / minimal installs: C locale is common by default; generate a locale before chasing display issues;
  • Older tmux configs: verify the UTF-8 switch;
  • Source material: herdrdev/herdr issue #3261 (open, 2026-08-26), anonymous summary; no remote session here, not reproduced (stated honestly).

Symptom

When using herdr over SSH, Chinese characters are garbled or input does not work.

Cause

Related to terminal encoding / remote locale (issue #3261, open, 2026-08-26); not a herdr core defect signal.

Solution

  1. Check the remote locale: locale should contain UTF-8 (e.g. LANG=en_US.UTF-8 / zh_CN.UTF-8).
  2. Keep SSH terminal encoding UTF-8; for tmux-like layers confirm set -g status-utf8 where applicable.
Verification Evidence
  • Material: issue #3261 (open, 2026-08-26), anonymous retrieval summary.
  • No remote session in this environment; not reproduced (stated honestly).

Applicable tools (1)

This problem is linked from the tool pages below — reachable from either side.

herdr

Source & evidence

Recorded Verified ✓ VerifiedApplies to 1 tool(s)
Entries contain locally measured or reviewable-source solutions; unmeasured items are explicitly labeled.

← Coding Agents & Terminal domain | Problem Catalog Experience | Facing another issue? Go to the Helpdesk