You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
macOS/iTerm2: Hebrew (RTL) text renders reversed inside herdr panes #5118
I confirm this is a reproducible bug, not a feature request, idea, question, contribution proposal, or direction check.
I reproduced this bug on the version and environment reported below using the exact steps provided.
Current behavior
Hebrew (right-to-left) text is displayed in reversed character order inside a herdr pane: שלום is shown as םולש. This happens with plain shell output, not only with agent TUIs.
Expected behavior
Hebrew text displays in the same order inside a herdr pane as it does in the host terminal outside herdr.
Reproduction
In iTerm2, start herdr and open a shell pane.
Run: echo 'TEST1: שלום world 123'
שלום is rendered as םולש.
Run the same command in a plain iTerm2 tab outside herdr: it renders correctly.
Impact
Any Hebrew output, including coding-agent responses, is unreadable inside herdr. The current workaround is to read it outside herdr.
I implemented this as an opt-in pane display transform in herdr itself, so Hebrew/Arabic render correctly in every outer terminal (VS Code, Ghostty, iTerm), not just ones with BiDi support.
Config: [ui] pane_transforms = ["bidi"] (default off, live reload)
printf 'سلام دنیا TESTING 123' in a pane: reversed order and unjoined letterforms — Persian needs contextual shaping, so it is doubly unreadable
the same command in a plain iTerm2 tab outside herdr renders correctly
captured the client's output through a pty: ASCII in the same line is written as contiguous runs, but every RTL letter is emitted as an individually cursor-positioned cell (ESC[2;70Hل, ESC[2;71Hا, ESC[2;72Hم, …), so the host terminal never receives a contiguous run to reorder or shape
a debug build that writes RTL words as contiguous logical-order runs renders correctly in iTerm2; same bytes reproduced on Linux
Happy to provide full captures if useful. Technical follow-up posted on #5500.
Activity
barnuri commentedon Oct 23, 2026
I implemented this as an opt-in pane display transform in herdr itself, so Hebrew/Arabic render correctly in every outer terminal (VS Code, Ghostty, iTerm), not just ones with BiDi support.
[ui] pane_transforms = ["bidi"](default off, live reload)unicode-bidicrate (UAX fix: support IME input for Chinese and other UTF-8 characters #9). ASCII rows are untouched; a full screen of Hebrew adds about 0.2 ms per frame.PR: #5500 (mirror: barnuri#1)
The PR gate may auto-close it because I'm not on
APPROVED_CONTRIBUTORS. If a maintainer wants this, please reopen it or add me to the list.MMTE commentedon Oct 25, 2026
Confirming this reproduces on Persian too, with a byte-level detail that may help the investigation.
TERM=xterm-256colorinside panesprintf 'سلام دنیا TESTING 123'in a pane: reversed order and unjoined letterforms — Persian needs contextual shaping, so it is doubly unreadableESC[2;70Hل,ESC[2;71Hا,ESC[2;72Hم, …), so the host terminal never receives a contiguous run to reorder or shapeHappy to provide full captures if useful. Technical follow-up posted on #5500.