ANSI
ISO/IEC 6429 (also known as ECMA-48) which defines the ANSI escape codes also provided a mechanism for ruby text for use by text terminals, although few terminals and terminal emulators implement it. The PARALLEL TEXTS (PTX) escape code accepted six parameter values giving the following escape sequences for marking ruby text:
CSI 0 \
(or simplyCSI \
since 0 is used as the default value for this control) — end of parallel textsCSI 1 \
— beginning of a string of principal parallel textCSI 2 \
— beginning of a string of supplementary parallel textCSI 3 \
— beginning of a string of supplementary Japanese phonetic annotationCSI 4 \
— beginning of a string of supplementary Chinese phonetic annotationCSI 5 \
— end of a string of supplementary phonetic annotations
Read more about this topic: Ruby Character