bug-ncurses
[Top][All Lists]
Advanced

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

Re: TERM Name Gets Corrupted


From: Thomas Dickey
Subject: Re: TERM Name Gets Corrupted
Date: Tue, 3 Jul 2018 20:08:31 -0400
User-agent: Mutt/1.5.23 (2014-03-12)

On Tue, Jul 03, 2018 at 02:52:13PM +0500, Ilya Petrov wrote:
> I got overridden getenv and got some output in a browser, it looks like:
> 
> �(B�)0�[1;3r�[m��[?7h�[H�[JHello World !!!
> 
> 
> Is it because browser doesn't have a tty and doesn't interpret special
> characters?

yes

There are programs that can be run in a browser to emulate a tty,
such as https://xtermjs.org/, writing to/from another computer,
though if you're writing to the browser directly it may not be that
simple.

> Details here:
> https://github.com/kripken/emscripten/issues/6766#issuecomment-402068383
> 
> I really want to run some simple ncurses app in a browser just for fun of it.
> What should I read and where to start to get this happen?

I'd start by reading a program such as xterm.js to see how I could make
the curses library talk to that directly...
 
> Best regards,
> Ilya.
> 
> On Sun, Jul 1, 2018 at 10:42 PM, Ilya Petrov <address@hidden> wrote:
> 
> > As you may have seen I've created a request to support reentrant getenv in
> > emscripten: https://github.com/kripken/emscripten/issues/6778
> > You may help by adding some persuading wording to my request.
> > Thank you,
> > Ilya.
> >
> > On Sat, Jun 30, 2018 at 4:34 AM, Thomas Dickey <address@hidden> wrote:
> >
> >> On Fri, Jun 29, 2018 at 12:49:17PM +0500, Ilya Petrov wrote:
> >> > Hello.
> >> >
> >> > I supply TERM=xterm-new environment variable to ncurses, but somewhere
> >> in
> >> > between this name gets corrupted to garbage like <�.
> >> > I instrumented some debug messages: BEFORE 1 - BEFORE 4 into
> >> > ncurses-6.1/ncurses/tinfo/read_entry.c:
> >>
> >> I see the followup here:
> >>
> >> https://github.com/kripken/emscripten/issues/6766#issuecomment-401093748
> >>
> >> --
> >> Thomas E. Dickey <address@hidden>
> >> https://invisible-island.net
> >> ftp://ftp.invisible-island.net
> >>
> >
> >

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

Attachment: signature.asc
Description: Digital signature


reply via email to

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