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...
Los códigos de escape ANSI se utilizan para dar formato a la salida de una
terminal de texto y se basan en un estándar
ANSI, ANSI X3.64 (también denominado ECMA-48). Cuando se intenta representar un código de escape el terminal lo intercepta y actúa en función a ese código, cambiando el cólor o moviendo el cursor. Las posibilidades de las secuencias de escape eran muy variadas y se utilizaban para dar formato y cambiar el aspecto de lo que se va a mostrar por la terminar.
Ver más en Wikipedia.org...