Markus Kuhn argues as follows:
1. > ... would make wcwith() useless
> for predicting the cursor position on a biwidth charcell output device,
> which is its one and only application.
2. > it is now what xterm uses
3. > The LS/PS characters were not intended for applications such as talking
> to a terminal emulator, so please don't send them to a terminal
> emulator.
4. > LS, PS, and zero-width space characters (along with Hangul Johab, Indic
> characters, etc.) are all treated like unassigned characters in xterm
> and you will get a default character printed for them, occupying one
> character cell.
Ad 1) wcwidth() can also be used as an equivalent of iswprint(). This
is legitimate according to the spec, and GNU ls already uses it this
way (because calling iswprint and then wcwidth would be redundant).
Therefore wcwidth() should also treat characters which have no sense
in a terminal emulator.
Ad 2), 4) I hope xterm will evolve further in the future.
Ad 3) Sure it doesn't make sense to send LS/PS to xterm now, just like
it doesn't make sense to send an 0x0C to xterm now. But this doesn't
mean that other char-cell applications might do the right thing for
them; 0x0C certainly works for printers.
Bruno
-
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/lists/