Reputation: 1525
I'm working on a small server application in C# which should provide a VT100/ANSI terminal interface (either via telnet, or modem).
I'm doing some research on VT100/ANSI and the more I read, the more I get confused. I want to implement a simple parser for dealing with ansi escape/control sequences, but the specs contain a lot of possible commands. Basically, my questions boil down to this:
1) Which commands should I implement if I deal with telnet-based clients (like putty), or a simple dialup program (like minicom or hyperterminal). I'm sure a lot of the escape sequences are simply not used or ignored in those apps.
2) Do I only need to process C0 control chars when they are prefixed with the ESC character? Or also when I encounter them in a normal text sequence? I cannot derive this crucial bit of information from the docs.
3) Should I care about private control sequences?
Thanks in advance,
Jeroen.
Upvotes: 2
Views: 3290
Reputation: 112682
You will have to detect the escape sequences in any case; however, you do not need to interpret all of them, but at least you should be able to skip them.
For instance Esc[5m
turns on blinking mode. If you want to ignore this mode, just skip "Esc[5m"
.
I do not think that the C0 control characters are prefixed with ESC.
I never encountered these private control sequences. Wait to see if they are used. There is no point in implementing something that might never be used.
Upvotes: 2