Skip to main content

S7C1T/S8C1T

AI-Generated Content
This page was generated with the assistance of AI and may contain inaccuracies. It is intended as a placeholder for future human verification. If you spot issues ahead of its initial review, please report them on GitHub!
Standard

S7C1T and S8C1T are DEC VT-series sequences that control whether the terminal sends C1 control characters as 7-bit escape sequences or as single 8-bit bytes in its responses.

Syntax​

ESC SP F      S7C1T — Send C1 controls as 7-bit sequences
ESC SP G S8C1T — Send C1 controls as 8-bit single bytes
Formal syntax
S7C1T = 0x1b, " ", "F" ;
S8C1T = 0x1b, " ", "G" ;

Description​

These sequences affect the format of the terminal's responses (e.g., to DA1, DSR, DECRQM queries), not how the terminal interprets input.

S7C1T — 7-bit mode (ESC SP F)​

Per the VT510 manual, S7C1T instructs the terminal to send C1 control characters in their 7-bit escape-sequence form. For example, CSI is sent as ESC [ (two bytes: 0x1B 0x5B) rather than the single byte 0x9B.

This is the default and most common mode. It is required for compatibility with UTF-8 environments, where bytes in the 0x80-0x9F range are part of multi-byte character sequences and cannot be interpreted as C1 controls.

S8C1T — 8-bit mode (ESC SP G)​

S8C1T instructs the terminal to send C1 control characters as single bytes in the 0x80-0x9F range. For example, CSI is sent as 0x9B (one byte) instead of ESC [.

warning

S8C1T is incompatible with UTF-8 encoding, since UTF-8 uses bytes 0x80-0xBF as continuation bytes. Virtually all modern terminals operate in UTF-8 mode and either ignore S8C1T or treat it as a no-op. This mode is only meaningful in legacy 8-bit character set environments (e.g., ISO 8859-x).

DA1 response detection​

Some applications send a DA1 query (CSI c) and examine whether the response begins with ESC [ or 0x9B to detect whether the terminal is in 7-bit or 8-bit mode.

Specifications​

SpecificationSection
XTerm ctlseqs—

Terminal support​

TerminalSupportVersionNotes
Terminal Emulators
Alacritty✗NoNo 7-bit/8-bit C1 control mode switching found
Bobcat✓0.9.07-bit/8-bit control mode, TerminalCtrl xterm compatibility
contour✗NoControlTransmissionMode enum exists but ESC SP F/G sequences not implemented
foot✗No8-bit C1 controls not supported per vt.c:753 and doc/foot-ctlseqs.7.scd
Ghostty✗NoNo implementation found for ESC SP F/G 7-bit/8-bit control mode selection. C1 controls are processed as ESC + (c-0x40) in stream.zig:748-756, but mode switching not implemented
iTerm2✗NoExplicitly marked as VT100_NOTSUPPORT
Kitty✗NoSequences recognized but ignored - Kitty only supports C0 controls
Konsole✗NoNo handlers for ESC SP F/G
mintty✗NoNo handler found for ESC SP F or ESC SP G in do_esc() switch statement
mlterm✓rel-0_2_1ESC SP F/G recognized but 7-bit/8-bit control output not explicitly implemented
PuTTY✗NoNo ESC SP F/G sequences implemented
Rio✗NoNo ESC SP F/G handling found
rxvt-unicode✗No
st✗No
terminology✗NoNot implemented
VT100✗No
VTE✗NoRecognized in ACS handler but implementation is commented out
WezTerm✗NoNo evidence found in code for ESC SP F/G sequences
Windows Terminal✓YesESC SP F/G dispatch SendC1Controls(false/true) in OutputStateMachineEngine.cpp:259-263
xterm✓YesImplemented in charproc.c:6121-6135. Requires vtXX_level >= 2
xterm.js✗NoNot implemented
Multiplexers
cy✗NoESC SP F/G not in EscDispatch
GNU Screen✗NoESC SP F/G not handled; Screen uses c1 command for C1 reception only
tmux✗NoParser is 7-bit only, ESC SP F/G not implemented
tuios✗No
Zellij✗No