[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ncurses-bug
Subject:    Re: TERM Name Gets Corrupted
From:       Thomas Dickey <dickey () his ! com>
Date:       2018-07-04 0:08:31
Message-ID: 20180704000831.GA4888 () prl-debian8-64 ! jexium-island ! net
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


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 <ilyaigpetrov@gmail.com> 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 <dickey@his.com> 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 <dickey@invisible-island.net>
> >> https://invisible-island.net
> >> ftp://ftp.invisible-island.net
> >>
> >
> >

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

["signature.asc" (application/pgp-signature)]

_______________________________________________
Bug-ncurses mailing list
Bug-ncurses@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-ncurses


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic