bug-ncurses
[Top][All Lists]
Advanced

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

RE: Display backslash-n in dialog?


From: Moray Henderson
Subject: RE: Display backslash-n in dialog?
Date: Wed, 27 Jul 2011 14:39:42 +0100

Thomas Dickey wrote:
> > From the man dialog Version: 1.1-20100428 from Fedora 14.
> >
> > man dialog section on color
> >
> > --colors
> >  Interpret embedded "\Z" sequences in the dialog text by the fol-
> >   lowing character, which tells dialog  to  set  colors  or  video
> >   attributes: 0 through 7 are the ANSI used in curses: black, red,
> >   green, yellow, blue, magenta, cyan and white respectively.  Bold
> >    is  set  by  'b', reset by 'B'.  Reverse is set by 'r', reset by
> >    'R'.  Underline is set by 'u', reset by 'U'.  The  settings  are
> >    cumulative,  e.g.,  "\Zb\Z1" makes the following text bold (per-
> >    haps bright) red.  Restore normal settings with "\Zn".
> >
> > Without the --colors don't know how \Z would be handled, or what
> > happens with what appears after the \Z
> 
> yes (without --colors, \Z has no special meaning).

There may be a bug then.  I have tested this up to dialog Version
1.1-20100428 - Fedora 15 LiveCD booted to runlevel 3 with vim-common
installed to provide xxd(1).  I captured hex dumps from the output of 2
dialog commands:

  dialog --msgbox "Hello\A world" 5 25 | xxd > 1
  dialog --msgbox "Hello\Z world" 5 25 | xxd > 2

The output should only differ by a single byte, from 'A' to 'Z', but running
a diff on the 2 files:

  --- 1 2011-07-27 13:19:08.221001346 -0400
  +++ 2 2011-07-27 13:19:15.631017150 -0400
  @@ -56,7 +56,6 @@
   0000370: 4b1b 5b31 333b 3338 481b 5b33 393b 3439  K.[13;38H.[39;49
   0000380: 6d1b 5b30 3b31 306d 1b5b 3131 3b32 3948  m.[0;10m.[11;29H
   0000390: 1b5b 3330 6d1b 5b34 376d 4865 6c6c 6f5c  .[30m.[47mHello\
  -00003a0: 4120 776f 726c 640a 0a08 0808 081b 5b33  A world.......[3
  -00003b0: 393b 3439 6d1b 5b30 3b31 306d 1b5b 3135  9;49m.[0;10m.[15
  -00003c0: 3b35 3448 1b5b 3f31 3030 306c 1b5b 3235  ;54H.[?1000l.[25
  -00003d0: 3b31 480d                                ;1H.
  +00003a0: 5a20 776f 0a0a 081b 5b33 393b 3439 6d1b  Z wo....[39;49m.
  +00003b0: 5b30 3b31 306d 1b5b 3135 3b35 3448 1b5b  [0;10m.[15;54H.[
  +00003c0: 3f31 3030 306c 1b5b 3235 3b31 480d       ?1000l.[25;1H.

Same effect with TERM=linux and TERM=vt100.


Moray.
"To err is human; to purr, feline."







reply via email to

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