Tomohiro KUBOTA wrote on 2004-03-01 11:11 UTC:
> > The patch below fixes the "cooked" mode editing behaviour of ttys in
> > Unicode/UTF-8 mode. The line editor in n_tty.c up to now assumes that
> > every byte >= 0x20 is a character and occupies one screen position. For
> > ttys in UTF-8 mode, this is not true any more. The patch fixes the two
> > following problems in line editing on UTF-8 ttys:
> 
> Does it assume that a character (not a byte) occupies one column on screen?
> It is not true for combining characters (wcwidth = 0) and doublewidth
> characters (wcwidth = 2).  I (and other east Asian people) would be glad
> if they are supported (or considered in the future plan).

I believe the only practical solution for this problem is to implement
BACKSPACE in UTF-8 terminal emulators such that it moves one *character*
to the left, not one *cell*. I know that this is not what backspace does
in some EUC terminal emulators, but I believe a strong case can be made
that traditional EUC terminal behaviour was not the adequate choice
here. We have little choice if we want to keep the kernel free of
locale-dependent monsters such as wcwidth().

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