BDSM Bi-directional Support Mode
Whether the terminal or the host handles bidirectional text.
CSI 8 h/l
Mode 8 is one of the two modes the fifth edition of ECMA-48 added for bidirectional text. Reset, control functions act on the presentation or the data according to DCSM; set, they act on the data, and the device handles the bidirectional aspects of the text itself.
| State | ECMA-48 calls it | Meaning |
|---|---|---|
Reset, CSI 8 l | EXPLICIT | control functions act where DCSM says |
Set, CSI 8 h | IMPLICIT | control functions act on the data, and the device handles bidirectional text itself |
Neither xterm nor libghostty-vt implements it. Both ignore CSI 8 h and CSI 8 l, and both answer DECRQM with 0, not recognized: the mode is not among the ones xterm’s do_ansi_rqm answers for.
Support
| Terminal | Version | Support | Notes |
|---|---|---|---|
| VT220 | manual, 2nd ed., 1984 | No | not in the manual, whose table of ANSI modes has only KAM, IRM, SRM and LNM |
| VT510 | manual, 1st ed., 1993 | No | not in the manual |
| xterm | patch 412, xterm-411a | No | ignored; DECRQM answers 0 |
| libghostty-vt | 0f171f6 | No | ignored; DECRQM answers 0 |
| ConEmu | build 230724, its documentation | No | not in its ANSI escape codes |
Validation
BDSM-1: Not recognized
\e[8$p
|_____|
reply \e[8;0$y
BDSM-2: Not recognized after it is set, either
\e[8h
\e[8$p
|_____|
reply \e[8;0$y