“plain text styling”…

Sławomir Osipiuk sosipiuk at gmail.com
Sun Jan 8 11:34:42 CST 2023


On Sunday, 08 January 2023, 09:15:21 (-05:00), Kent Karlsson via Unicode wrote:
>
> The point is that the ”protocol” is at plain text level. That is why ECMA-48 styling can work for applications like terminal emulators, where higher-level protocols, like HTML, are out of the question.

This does not make sense. Both are formats that need to be interpreted by the display software or they just look like junk within the visible text. HTML and ECMA-48 are no different in principle. You can write a terminal emulator that respects basic HTML styling. The only reason it hasn't been done is because there is no demand, and that is because of historical reasons (including that many terminal scripting languages have syntax that would conflict with HTML).

> > From a simple (basic) text editor perspective that knows nothing about styling, what is the difference between displaying these two examples related to same intended result ?
> > <b>bold</b>
> > versus
> > \x1b[1mbold\x1b[2m
>
> The first one is a higher level protocol (interpreting substrings consisting purely of ”printable characters” as controls; counting SP,HT and LF as ”printable"), the second is a text level protocol.

No. Whether "<" or \x1b is a special syntax introducer makes no real difference. You need something to recognize it and interpret it. Both standards are about interpreting substrings, with opening and closing characters and formatting information between them. There is nothing inherently special about having the characters be below \x20, certainly not any more than, for example, using the tag characters.





More information about the Unicode mailing list