bug-ncurses
[Top][All Lists]
Advanced

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

Re: Are there two families of escapes sequences?


From: Thomas Dickey
Subject: Re: Are there two families of escapes sequences?
Date: Fri, 24 Oct 2014 06:11:43 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

On Tue, Oct 21, 2014 at 10:05:09PM -0400, Patrick wrote:
> Hi Everyone
> 
> I've been reading quite a bit and making progress understanding
> ncurses, terminals, locales, UTF-8, gpm etc..
> 
> I have a mouse enabled application running right under fbterm, just
> on top of the Linux tty, UTF enabled.
> 
> I am still having some trouble with color under fbterm but like all
> of my other problems I am sure it is a matter of configuration.
> 
> I found a script called 256colors2.pl which is widely available on the net.

offhand, the "widely available" one is from xterm.
 
> It is not displaying colors right for me. I piped it's output to a
> file and it looks like:
> 
> <ESC>]4;16;rgb:00/00/00<ESC>

I don't see that...  Translating the ESC's to \E, etc., I see this type
of output:

\E]4;16;rgb:00/00/00
\E\\
\E]4;17;rgb:00/00/5f
\E\\
\E]4;18;rgb:00/00/87
\E\\

...so you appear to be missing the "\" character.

The \E] part is (see ECMA-48) an OSC (operating system command).
It is supposed to end with a string terminator (shown here as \E\\,
that is, the escape character followed by a backslash).  There is
an 8-bit (single byte) equivalent 0x9c.

OSC is a special case in ECMA-48.  Most of the control sequences 
begin with CSI (\E[) and end with a final character in the upper
part of the printable 7-bit codes, as Richard notes.

Only the form of OSC is standardized.  The content (between \E] and \E\\)
is implementation-dependent.  The OSC 4 which you point to is an xterm
control sequence.

Back in the 1980s, someone implemented OSC in xterm for titles, but made that
accept BEL (control/G, or 0x07).  That does not follow any standard.
I modified xterm to accept ST, but kept the BEL (due to its widespread
use).

-- 
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net

Attachment: signature.asc
Description: Digital signature


reply via email to

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