1

What are the relevant standards, man pages, RFCs or other pieces of documentation when implementing a POSIX-style unicode terminal emulator?

The scope of this question spans everything from handling multi-codepoint unicode characters and other unicode pitfalls, behaviour of the terminal when resizing, control sequences to RGB values associated with certain color codes.

While articles such as the Wikipedia page on ANSI escape sequences might suffice for using a terminal emulator, writing one that will behave correctly for all applications, which includes correctly handling invalid, unknown or user-defined inputs requires actual standard documentation.

My best source so far are ECMA-048, man 3 termios, and the source code of various other terminal emulators.

mic_e
  • 5,594
  • 4
  • 34
  • 49

1 Answers1

1

Obviously, you already added The Unicode Standard to your list of sources. :-)

By a POSIX-style unicode terminal emulator, do you mean a terminal emulator accepting the whole Unicode charset (or a large subset of it), and running on POSIX-compliant operating system? Then since POSIX restricts itself since 2001 on 8-bit chars, this pretty much means a UTF-8 terminal emulator, a restricted case of such emulators where you would not have to deal with various charsets and encodings (definitively a good thing) but where characters are basically multi-byte, which in turn may call for functions like wcwidth(3) (which is not strictly POSIX, only XPG by the way); more generally, rendering problems can be arbitrarily complex with Unicode, including BiDi, Indic scripts with reordering vowels, ...

If you mean something else, please elaborate.

Otherwise, since an emulator also relies on a keyboard, you may encounter interesting content on Wikipedia.

Another source of documentation with a lot of information you might use is the Microsoft Go Global site.

Community
  • 1
  • 1
AntoineL
  • 888
  • 4
  • 25