[EMAIL PROTECTED] (Markus Kuhn) wrote on 15.03.01 in
<[EMAIL PROTECTED]>:
> Kai Henningsen wrote on 2001-03-14 22:43 UTC:
> > * There should be a certain octet sequence that will *always* get the
> > terminal into a state where one can use the query-and-modify-state
> > functions, no matter what the terminal is currently doing. (Think of the
> > situation where a program is kill -9ed and you want to restore the diplay,
> > for example. Even if you just were in the middle of a multi-megabyte font
> > download, you still want to be able to reset right now.) Implementing this
> > right probably means you need to keep a state machine running directly at
> > the receive-a-character point, and you also need to keep this in mind when
> > designing escape mechanisms for binary data such as for font downloads.
>
> ISO 6429 has already a mechanism for that: CANcel (0x18) resets both the
> ESC sequence and the UTF-8 parsers into their initial state. And ESC
> itself as well as all other characters in the range 0x00-0x2F do that,
> too, so you do not have to precede an ESC sequence with CAN and no ESC
> sequence will be parsed beyond the end of the line. It is all very
> robust and well designed, if only authors of terminal emulators would
> read it.
>
> ISO 6429 defines the proper state machines that you wish. ISO 6429
> forbids "escape mechanisms for binary data".
I rather doubt that.
> An ISO 6429 ESC sequence
Note that "an escape mechanism" is rather a different animal from an "ESC
sequence". A simple example for an escape mechanism as proposed would be
to convert the font to hex and put it into one of the control strings[1].
More elaborate examples are, of course, possible.
And note that there *are* ESC sequences for dynamic fonts in 2022. (Though
I couldn't find any definition on how those are supposed to work.) (I
think it was 2022.)
> (including all permitted private extensions) always starts ESC [,
> continues with an arbitrary sequence of characters from the 0x3X range
> ('0' .. '?') and ends with a letter. You can't transfer more than 4 bit
> per character payload data inside an ESC sequence.
Control strings. 00/08-00/13, 02/00-07/14. By my count, that's a bit more
than 4 bit.
[1]
5.6 Control strings
A control string is a string of bit combinations which may occur in the data stream as
a logical entity for
control purposes. A control string consists of an opening delimiter, a command string
or a character string,
and a terminating delimiter, the STRING TERMINATOR (ST).
A command string is a sequence of bit combinations in the range 00/08 to 00/13 and
02/00 to 07/14.
A character string is a sequence of any bit combination, except those representing
START OF STRING
(SOS) or STRING TERMINATOR (ST).
The interpretation of the command string or the character string is not defined by
this Standard, but
instead requires prior agreement between the sender and the recipient of the data.
The opening delimiters defined in this Standard are
a) APPLICATION PROGRAM COMMAND (APC)
b) DEVICE CONTROL STRING (DCS)
c) OPERATING SYSTEM COMMAND (OSC)
d) PRIVACY MESSAGE (PM)
e) START OF STRING (SOS)
MfG Kai
-
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/lists/