The notion of a "backspace" control character is rather useless
when it is confronted with the more sophisticated mechanisms of
a multi-width ligature-aware terminal.

I have the feeling that what we really want is a control character for
an UNDO function that just undoes the last state change that appears to
have been made to the glyph left of the current cursor position. If
undoing that state change leaves the character position empty, then this
UNDO function should also move the cursor back onto that position.

If we turned the semanics of the old ill-defined BACKSPACE control
function (originally introduced for overstriking on teletype printers!)
into this UNDO control function, then the cooked tty mode would not have
to know anything about wcwidth or ligatures. It would simply echo each
BACKSPACE with q BACKSPACE and remove in its buffer the one single UTF-8
character left of the cursor position. We could even remove the
dreadfull BACKSPACE SPACE BACKSPACE echo hack^H^H^H^Hmechanism, as it
will now be unambiguously the duty of the terminal to do the right thing
when it sees a BACKSPACE.

Markus

-- 
Markus Kuhn, Computer Lab, Univ of Cambridge, GB
http://www.cl.cam.ac.uk/~mgk25/ | __oo_O..O_oo__


--
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/linux-utf8/

Reply via email to