#ecma35 — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #ecma35, aggregated by home.social.
-
All in all, getting it right, and compatible with what's out in the world, is quite a task. Many of us end up with entire DEC VT state machines. Because it turns out that it's perfectly legitimate to emit some C0 control characters in the middle of a control sequence. I kid you not.
-
And then once control sequences are parsed correctly, on top of that there are four different types of control sequence used in the wild for setting colours: old AIXterm, XTerm 256-colour, ITU/IEC T.416 faulty, and ITU/IEC T.416 correct.
There's a whole history of a missed field and erroneous use of semi-colons instead of colons, for the ITU/IEC T.416 faulty case.
Plus the "default" colour.
Plus multiple graphics rendtions in a single control sequence.
-
Colours in ncurses. Ouch!
Your SGR parser is a bit simplistic. The basic syntax of control sequences in ECMA-35 and ECMA-48 is a bit more complex than that. More than digits can be parameter characters, and there are intermediate characters to contend with too. Plus there's true CSI rather than its 7-bit alias.