Index | Thread | Search

From:
Walter Alejandro Iglesias <wai@roquesor.com>
Subject:
Re: timing-dependent(?) display in xterm(1)
To:
Ingo Schwarze <schwarze@usta.de>
Cc:
tech@openbsd.org
Date:
Sat, 10 May 2025 20:46:42 +0200

Download raw body.

Thread
Hi Ingo,

On Sat, May 10, 2025 at 04:19:06PM +0200, Ingo Schwarze wrote:
> Hello,
> 
> while wotking on VI command line editing mode in ksh(1), i stumbled
> over the following, which i believe might possibly be a quirk
> in xterm(1).  I'm not yet sure what is going on, hence the question
> mark after the word "timing-dependent".
>
> [...]
>

I've been reading this:

  https://invisible-island.net/xterm/bad-utf8/

And downloaded this file:

  https://invisible-island.net/xterm/bad-utf8/UTF-8-test-20150828.txt

If you cat that file in xterm and then in vte3 or xfce4-terminal from
ports you'll see the difference in the characters printed.  Compare the
examples under the following item:

 ---
 | 3.1  Unexpected continuation bytes
 |
 | Each unexpected continuation byte should be separately signalled as a
 | malformed sequence of its own.
 |
 | 3.1.1  First continuation byte 0x80: "<?>"
 | 3.1.2  Last  continuation byte 0xbf: "<?>"
 |

In many cases, under xterm, UTF-8 continuation bytes followed by an
ASCII character do weird things.  The most weird case is:

  $ printf "\x9ax\n"

  (Replace the 'x' with any ASCII printable character or its hex
   representation.)

None of that happens with vte3 or xfce4-terminal from ports.


-- 
Walter