Ecma-48 proposed styling controls update updated & math expression representation proposal update

Kent Karlsson kent.b.karlsson at bahnhof.se
Tue Jan 9 16:12:48 CST 2024


>>> there is also one single character in C1 (so still two bytes in UTF-8), but many terminal disregard this alternate (which it is also very old).
>> Because in a terminal (emulator) the character encoding may change without notice.
> 
> […] In any case, if the terminal (emulator) is using UTF-8, it should be clear that such sequences are useable.

I repeat, the reason why terminal emulators by default ignore what might be C1 characters is that the character encoding may change without notice. (Excluding EBCDIC.) You may get “mojibake”, but not worse than that.

Xterm, at least, allows turning C1 interpretation on.

Note that out of the ECMA standards you mentioned, only ECMA-48 is still viable, and very much so. All the others are defunct, and should be ignored.

> Yes, but do we really care so much about styling in terminal emulators?

Not sure what “we” you are referring to…
But some things are already implemented, like more  colours, more underlines and with separate colouring.

I do not attempt to change that ECMA-48 is a smörgåsbord of things to choose from. And I am not sure I can persuade terminal emulator developers to implement tables, but it would surely be nice to have proper tables and not just “ASCII art” tables…

And, as I have mentioned, add some styling capability to otherwise “plain text” editors. Not having to use a high end document formatting tool if you don’t really need that for some underlining, bold, bigger letters, or even tables. Not everything has to be super-high end for styling text.

> In my experience, the best formatted text in emulators were (and are) the manual pages (bold, italic, good *dynamic* layout, etc.). But I (and it seems most of people) find much more readable to view them online (also on very bad html-formatted, which are unfortunately common).

No, I would not recommend using a terminal emulator for viewing web pages.

> (and I found Lynx and w3c bad).
> 
> 
> But how do you input the formatting?

For output to a terminal emulator from a program, the source program would have string constants for control sequences or parts thereof, just like done now.

For a styling enhanced plain text editor one should be able to select a text portion, and then use a menu or keyboard shortcut to select a styling, as it is done in just about any modern text editor. There is no need for an end user to see the styling codes. Using something like HTML syntax would have terrible consequences in that it is hard to tell content from controls. For HTML for instance one MUST use < for <, so that it is not taken as start of a “tag”. That is absolutely nothing you want to see for a terminal, nor for a styling enhanced plain text editor.

/Kent K




More information about the Unicode mailing list