Ansi escape sequences as bytes

2019-02-27 17:10发布

问题:

Could someone run me through the bytes in the ansi escape sequences... I'm coding with pen and paper at the moment, and all the ansi tutorials list the codes as ESC[.... I need to see the actual bytes in the stream. Would one of you gurus with unlimited amount of time devoted to retards like me like to exemplify one or two sequences in bytes? Big thanks!

回答1:

The first Google image hit for "ascii table". You're welcome. Just match the characters in the tutorial with the red characters, and take the corresponding hex value!



回答2:

Escape is 0x1B and [ is 0x5B, so you want 1B5B.



回答3:

You may look for ANSI Sequences to color a terminal (maybe telnet?). I only got a Link for it: Ansisequences...



标签: telnet ansi