bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: ANSI escape character


From: Aharon Robbins
Subject: Re: ANSI escape character
Date: Sat, 21 Feb 2009 23:05:06 +0200

Greetings.  Re this:

> Date: Sat, 21 Feb 2009 16:53:44 -0300
> Subject: ANSI escape character
> From: djalma nogueira schwindt <address@hidden>
> To: address@hidden
>
> Hello
> Sorry if this topic has already been addressed but I didn't find any
> reference.
> I realy don't know if this is a bug.
> Some time ago I developed an interactive gawk program that it runs on
> windows XP and I use the
> version 3.0.4. Now I downloaded the version 3.1.6 from sourceforge.net but
> the result is not the same.
> To simplify, I wrote the awk program bellow:
>
>  BEGIN{cor="\033[1;33;40m"
>        printf "%s",cor
>        print "awk string"
> }
>
> When run with version 3.0.6, the result is correct. It is shown only to
> literal "awk string" in yellow.
> But when I use the version 3.1.6, it shows:
>
> $B"+(B[1;33;40mawk string
>
> That is, the ANSI escape character is not interpreted.
> Both executions are performed in the same DOS window.
> Much appreciate your comments on this.
> Thank you in advance
> Regards
> Djalma

I can't help you with the Windows part. On my Linux system I get
identicial output from both versions (as expected):

$ gawk-3.0.6 'BEGIN{cor="\033[1;33;40m"
>        printf "%s",cor
>        print "awk string"
> }' | od -c
0000000 033   [   1   ;   3   3   ;   4   0   m   a   w   k       s   t
0000020   r   i   n   g  \n
0000025

$ gawk-3.1.6 'BEGIN{cor="\033[1;33;40m"
>        printf "%s",cor
>        print "awk string"
> }' | od -c
0000000 033   [   1   ;   3   3   ;   4   0   m   a   w   k       s   t
0000020   r   i   n   g  \n
0000025

You might want to try recompiling from sources, either the distributed
3.1.6 or the current gawk-stable CVS from savannah.gnu.org.

Good luck,

Arnold




reply via email to

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