Bug 115448 - ncurses-5.4 missing escape charactes
ncurses-5.4 missing escape charactes
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: ncurses (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Eido INOUE
:
: 115616 115671 116705 (view as bug list)
Depends On:
Blocks: FC2Blocker
  Show dependency treegraph
 
Reported: 2004-02-12 11:58 EST by Sammy
Modified: 2007-11-30 17:10 EST (History)
15 users (show)

See Also:
Fixed In Version: 5.4-3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-02-25 18:29:16 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Modified xterm patch for ncurses-5.4 (45.86 KB, patch)
2004-02-13 16:20 EST, Sammy
no flags Details | Diff

  None (edit)
Description Sammy 2004-02-12 11:58:52 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.2; Linux; X11; en_US, en) (KHTML, like Gecko)

Description of problem:
After installing ncurses-5.4-1 certain escape characters start to
show when editing files with vim. I think this happened when we
did the last major upgrade and had to do with xterm escape
characters or something like that, which was fixed later on.


Version-Release number of selected component (if applicable):
ncurses-5.4-1

How reproducible:
Always

Steps to Reproduce:
1.install ncurses-5.4-1
2.edit file with vim and try to do some searches
3.
    

Additional info:
Comment 1 Eido INOUE 2004-02-12 14:02:10 EST
I'm not seeing this on Fedora Core in the en_US.UTF-8 locale or the
ja_JP.UTF-8 locale
Comment 2 Sammy 2004-02-12 14:12:31 EST
Well, I presume I am using en_US since I have everything from 
todays development tree. 
 
Just vi a text file and search a string, the highlight stuff is showing 
like: 
 
^[36m^[44mopenoffice.org-1.1.0-27 
^[36m^[44mopenoffice.org-i18n-1.1.0-27 
^[36m^[44mopenoffice.org-libs-1.1.0-27 
 
Is there anything I need to change? When I use ncurses-5.3-10 it 
shows fine. 
 
Comment 3 Eido INOUE 2004-02-12 15:01:51 EST
I see-- you're using gnome-terminal and not the console.

The TERM is set wrong for newer gnome-terminal. Not sure if I want to
repatch ncurses to make xterm behave like gnome-terminal.

As a workaround, setting:

export TERM=gnome-rh90

before doing vim should work

accepting bug
Comment 4 Sammy 2004-02-12 15:32:29 EST
I am actually using kde konsole. The $TERM seems to be 
set to xterm. 
Comment 5 Eido INOUE 2004-02-12 15:38:29 EST
then setting the TERM to "konsole" should work
Comment 6 Sammy 2004-02-12 16:20:26 EST
This worked for vi BUT then I lost my DIR_COLORS for ls. Looking 
into this coreutils-5.0 brings many things that use xterm and  
/etc/DIR_COLORS.xterm, so it would be nice  if one can implement 
the xterm stuff into the ncurses. 
Comment 7 Eido INOUE 2004-02-13 15:33:32 EST
with respect to /etc/DIR_COLORS in comment 6, adding both "TERM
gnome-rh90" and "TERM konsole" (and TERM xtermc unless you use
xterm-color).

I'm currently experimenting with the pros and cons of being "correct"
(real xterm does not support colors) vs the traditional hacked/patched
convenience version of xterm from the past.

If we go with the pedanticly correct xterm then the default TERM will
have to be modified, along with DIR_COLORS.
Comment 8 Sammy 2004-02-13 16:20:23 EST
Created attachment 97662 [details]
Modified xterm patch for ncurses-5.4

Modified xterm patch for ncurses-5.4
Comment 9 Sammy 2004-02-13 16:20:37 EST
In the mean time I have modified the old patch and rebuilt the 
rpm. It is working fine. I'll attach the patch. I'll use this unless 
I hear otherwise. 
Thanks 
Comment 10 Moritz Barsnick 2004-02-14 07:41:10 EST
I can confirm that ncurses-5.4 leaves mutt and lynx uncolored in 
gnome-terminal (TERM=xterm, which seems to be the default).

OTOH, gnome-terminal is missing documentation as where to have it set 
its TERM variable, and vte is quite undocumented. ;-) (Setting it in 
bashrc is a hack, IMHO.)
Comment 11 Bill Nottingham 2004-02-16 02:09:55 EST
*** Bug 115671 has been marked as a duplicate of this bug. ***
Comment 12 Bill Nottingham 2004-02-16 02:10:00 EST
*** Bug 115616 has been marked as a duplicate of this bug. ***
Comment 13 Aleksey Nogin 2004-02-19 22:56:05 EST
Re: comment #5

> then setting the TERM to "konsole" should work

If I do, then tcsh complains. Filed bug 116330 on that one.
Comment 14 Thomas E. Dickey 2004-02-20 15:59:07 EST
Updating termcap shouldn't be that hard (I generate one from
terminfo periodically as I update that).  But I guess that's
a different package.

The last I knew, gnome-terminal had no provision for setting
$TERM to anything but "xterm" (recent look at the source).
Ditto konsole (but it's been a little longer since I looked
at it).
Comment 15 Moritz Barsnick 2004-02-24 12:24:36 EST
Hi dickey (T.E., I assume? bugzilla says you're "Need Real Name" ;->)
,

is it true that if gnome-terminal sets "xterm" (and _only_ this), 
that it then should behave that way? Or at least as the 
well-respected, but not compatible/identical xterm-color? Does it 
perhaps do so? I guess it should provide its own proper termcap and 
terminfo, if not...

ncurses seems to (correctly) obey its xterm (!= xterm-color!) 
setting, and is therefore uncolored.

BTW, multi-gnome-terminal does indeed accept an argument to set its 
TERM variable.

Another BTW: some programs complain about "gnome-rh9", probably 
because it's only in termcap and not terminfo (or vice versa).

Should I file more bugs?  ;-)
a) gnome-terminal sets TERM incorrectly
b) gnome-rh9 is not implemented correctly/completely
c) ...
Comment 16 Thomas E. Dickey 2004-02-24 18:54:32 EST
yes (t.e.).  less typing is better...

I'm guessing that some application is deciding that the
escape sequences aren't going to be displayed, and "fixing"
it by displaying them in printable form.  I suggested that
the reporter might be using "screen" (but didn't see any
discussion of this).  gnome-terminal doesn't provide its own
terminfo/termcap (but I did add a "gnome" to ncurses's terminfo).
I hadn't noticed anyone mentioning "gnome-rh9" before.  It's
not in my copy of Redhat9 (I see a gnome-rh62, gnome-rh72).

However - rereading the thread, it sounds as if gnome-terminal is
at fault.  Echoing escape sequences at that level is always a bug.
gnome-terminal in the past has done this in several places, so
I wouldn't find that surprising.  It would be nice if someone
took the time to fix gnome-terminal.
Comment 17 Eido INOUE 2004-02-25 14:45:59 EST
I was the person that said "gnome-rh9". It's in the terminfo.src and
reflects the newest vte (component of gnome-terminal).

Also, "gnome" exists, and it currently points to "gnome-rh9",
suggesting that "gnome" always points to the newest version. I'd
recommend using "gnome" over "gnome-rh9".

As for the echoing of escape sequences in printable form, it seems
that only vim does this. I'm not sure why yet. Still investigating.
Comment 18 Eido INOUE 2004-02-25 15:49:53 EST
*** Bug 115499 has been marked as a duplicate of this bug. ***
Comment 19 Eido INOUE 2004-02-25 18:28:41 EST
*** Bug 116705 has been marked as a duplicate of this bug. ***
Comment 20 Leonard den Ottolander 2004-02-26 06:43:04 EST
Could this bug and all it's duplicates be versioned correctly? I
believe we are speaking of FC 2 test 1 here.
Comment 21 Bastien Nocera 2004-02-26 07:16:17 EST
Yes, I'm reopening 115499 as it's against FC2 now.
This bug is closed and against FC1 test 3.
Comment 22 Leonard den Ottolander 2004-02-26 07:45:07 EST
How can this bug be against FC1 test 3?? FC 1 was released months ago.
As ncurses 5.4 is in FC 2 test 1 this should be retagged to FC 2 test
1 and so should the duplicates.
Comment 23 Eido INOUE 2004-02-26 12:01:39 EST
comment 22: fixing
Comment 24 Thomas E. Dickey 2004-02-28 16:16:48 EST
"gnome-rh90" is in my source, not "gnome-rh9" (but it was
late, and I was looking at my copy of Redhat 9 which of
course had neither.

Note You need to log in before you can comment on or make changes to this bug.