screen-users
[Top][All Lists]
Advanced

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

Re: Interesting things found in ncurses that affect screen


From: Michael Schroeder
Subject: Re: Interesting things found in ncurses that affect screen
Date: Mon, 18 Jul 2005 12:18:24 +0200
User-agent: Mutt/1.4.2.1i

On Sun, Jul 17, 2005 at 09:19:38PM +0200, Nikolai Weibull wrote:
> OK, so once again something weird happened while I was using a ncurses
> application in screen.  It's been working fine for a long time and then
> boom, something weird's going on, I'm not getting pretty line-drawing
> characters any more.  So I swear a bit and begin looking into screen,
> ncurses, and the applications code and come up with this wonderful piece
> of code from ncurses:
> 
> ncurses-5.4/ncurses/tinfo/lib_setup.c:
> 
> /*
>  * Check for known broken cases where a UTF-8 locale breaks the alternate
>  * character set.
>  */
> NCURSES_EXPORT(int)
> _nc_locale_breaks_acs(void)
> {   
>     char *env = getenv("TERM");
>     if (env != 0) {
>         if (strstr(env, "linux"))
>             return 1;           /* always broken */
>         if (strstr(env, "screen") != 0
>             && ((env = getenv("TERMCAP")) != 0
>                 && strstr(env, "screen") != 0)
>             && strstr(env, "hhII00") != 0) {
>             return 1;
>         }
>     }
>     return 0;
> }
> 
> So, what's the deal?  Beyond the fact that this check is utterly
> idiotic, as I could simply unset TERMCAP and the test would fail, I
> really don't understand what the problem is with using UTF-8 in ncurses
> inside screen.  Is there actually a valid reason for ncurses to do this
> test?

Don't ask me, I'm not aware of any problems screen has with UTF-8.
Maybe Thomas Dickey, the ncurses author, can shed some light on
this.

(CC to address@hidden)

Cheers,
  Michael.

-- 
Michael Schroeder           address@hidden
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}




reply via email to

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