ANSI escape codes are used to control text formatting and other output options on
text terminals. In this context,
ANSI refers to the ANSI X3.64 standard (which was withdrawn in 1997). It was replaced by
ISO/
IEC 6429, and is equivalent to
ECMA-48.Most of these
escape sequences start with the characters ESC (
ASCII decimal 27/
hex 0x1B/
octal 033) and [ (left bracket). This sequence is called CSI for Control Sequence Introducer (or Control Sequence Initiator). There is a single-character CSI (155/
0x9B/
0233) as well. The ESC+[ two-character sequence is more often used than the single-character alternative, although terminals which support
ISO 8859 recognize either sequence. Other devices, e.g., those supporting only
ASCII (7-bits), or which implement 8-bit code pages which use the 0x80–0x9F control character range for other purposes will recognize only the two-character sequence.
See more at Wikipedia.org...