TragicWarrior / libvterm

Based on libROTE, libvterm is a color terminal emulator. It mimics vt100, rxvt, xterm, and xterm 256 color mode
Other
38 stars 7 forks source link

RFC: PoC C1 Control Sequences #159

Closed lwi closed 4 years ago

lwi commented 4 years ago

Issues I discovered:

This pull request just shows a proof of concept embedding C1 in escape_simple and _osc and handling it like an "escape sequence". Also see https://github.com/TragicWarrior/libvterm/issues/147

lwi commented 4 years ago

I added support for UTF-8 encoded C1 control characters.

TragicWarrior commented 4 years ago

@lwi , the code looks good to me. are you content with?

lwi commented 4 years ago

@TragicWarrior the code is okayish as it is, however the original issues remain (in the code there is only a concept of "escape sequences" implying they start with a ESC which is not accurated anymore with C1 controls). Also the code supports raw C1 and UTF-8 encoded. xterm only supports them raw, VTE only UTF-8 encoded. UTF-8 encoded C1 are very rare and Fedora would be one of the first users. A very strict UTF-8 terminal emulator (like tmux) would probably discard raw C1 because it can be mistaken for broken UTF-8 (an out of context UTF-8 continuation byte to be exact). So its debatable whether and to what extend we should support C1 controls. That being said, if C1 control support in raw and UTF-8 encoded form is fine with you, this pull request should be fine.