[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Groff] Re: backspace and Unicode in terminals

From: Bruno Haible
Subject: [Groff] Re: backspace and Unicode in terminals
Date: Thu, 17 Mar 2005 22:58:56 +0100
User-agent: KMail/1.5

Andries Brouwer wrote:
> There are many types of TTY. A termcap/terminfo entry would tell you
> what escape sequence causes the cursor to move left one position.
> (In termcap the boolean bs will tell you whether it is 010, backspace.)
> Such cursor movement is entirely independent of the text present
> on the screen.

However, starting to write text in the middle of a double-width character
does not really work.

For example, xterm and KDE's console both set TERM=xterm. For both,
the terminfo entry (shown by "infocmp xterm") has cub1=^H, so indeed
\x08 should move the cursor left by one column. In both, \x08 \x08
goes back over a Japanese double-width character:

  $ echo -n '日本語' ; printf '\x08\x08' ; echo xyz

But when only one \x08 is used, the results differ: In xterm,

  $ echo -n '日本語' ; printf '\x08' ; echo xyz

where the I is half of a Japanese character, and disappears when selected.
In konsole, the same thing produces produces major screen garbage.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]