Skip to main content

Module charset

Module charset 

Source
Expand description

Character-set designation and locking-shift sequences.

§Category

This module emits SCS (ESC plus a G-set selector and charset designator) and the locking-shift controls that map G1/G2/G3 into GL or GR.

§Escape format

SCS is a short 7-bit ESC sequence rather than CSI/OSC/DCS:

ESC ( B
─┬─ ┬ ┬
intro G0 charset

The caller supplies the G-set selector byte and charset identifier exactly as they should appear on the wire.

§Mode interaction

Charset selection affects how subsequent bytes are rendered by terminals that honor ISO-2022 character sets. It is independent of DECSET/DECRST modes.

Constants§

LS2
Lock G2 into GL: exact bytes ESC n.
LS3
Lock G3 into GL: exact bytes ESC o.
LS1R
Lock G1 into GR: exact bytes ESC ~.
LS2R
Lock G2 into GR: exact bytes ESC }.
LS3R
Lock G3 into GR: exact bytes ESC |.

Functions§

write_select_charset
Designate a character set with ESC <gset> <charset>.