SO (Shift Out) is ASCII code point 14 (0x0E), Unicode U+000E. It is a C0 control character that switched a teleprinter from its default character set to an alternate one — reversed by SI (0x0F) to restore the original. ISO 2022 formalized this as the G0/G1 toggle, enabling multilingual text over 7-bit links. VT-series terminals used SO to activate the DEC Special Graphics set for box-drawing characters. A stray 0x0E in a terminal stream produces garbled output until an SI resets the mapping — a classic debugging headache in raw serial and SSH sessions. UTF-8 encodes it as the single byte 0x0E; Unicode classifies it as Cc (Control) with the alias SHIFT OUT.
unsigned char so = 0x0E; // SO: Shift Out (select alternate set)unsigned char msg[] = { so, 'q', 'x', 0 }; // Terminal may render line-drawing after SOsize_t n = strlen((char*)msg); // Treat as bytes; SO is not string terminator
SO (ASCII 14) switches output to an alternate character set. On old printers and terminals, this might activate a different font, language, or symbol set. It's the 'switch mode' signal — everything printed after SO uses the alternate set until SI reverses it.
With only 128 characters in ASCII, there wasn't room for multiple languages or symbol sets. SO/SI provided a simple multiplexing trick — use the same 94 printable positions but map them to different characters depending on the current 'shift' state.
Yes. If a stray SO byte appears in terminal output without a matching SI, the rest of your display can transform into garbled symbols. This is a classic symptom of accidentally cat-ing a binary file — the terminal gets stuck in an alternate character set.
Type 'reset' (even if you can't see it properly) and press Enter. Alternatively, send a SI byte manually with echo -e '\x0f'. This forces the terminal back to the standard character set. The 'reset' command also clears other broken terminal states.