bug-ncurses
[Top][All Lists]
Advanced

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

Re: Strange behavior of Ncurses


From: G. Branden Robinson
Subject: Re: Strange behavior of Ncurses
Date: Fri, 11 Oct 2024 13:11:02 -0500

At 2024-10-11T13:18:16+0000, Urban Söderberg wrote:
> We did strace on our application and could see that character
> sequences are caused by ncurses.
> 
> File: dev-pts-2-trace3.log
> Printout lines starting with spaces.
> We can see several lines like this:
> [pid 2001732] 12:04:54.106158 write(1</dev/pts/2<char 136:2>>, 
> "\33[J\33[1;17H", 10) = 10 <0.000015>
> This causes issues.

Just FYI, the sequence in question,

\33[J

looks like "CSI J", the ECMA-48 escape sequence for clearing the screen,
[1] and

\33[1;17H

looks like "CSI H", the ECMA-48 escape sequence for (absolute) cursor
positioning ("CUP").

A copy of ECMA-48 can be found here:

https://www.ecma-international.org/wp-content/uploads/ECMA-48_5th_edition_june_1991.pdf

If ncurses is emitting those sequences, it is likely because the
terminfo database entry for the value of $TERM on the system records
that they are how to manifest the operations in question.

Is your $TERM correct?

Regards,
Branden

[1] ECMA-48 calls it "ERASE IN PAGE"; the ctlseqs.ms document calls it
    "Erase in Display".  Both abbreviate it as "ED".

Attachment: signature.asc
Description: PGP signature


reply via email to

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