httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Plüm, Rüdiger, VF-Group" <ruediger.pl...@vodafone.com>
Subject Re: svn commit: r691418 [2/2] - in /httpd/httpd/trunk: ./docs/manual/mod/ modules/filters/
Date Wed, 10 Sep 2008 08:10:20 GMT
 

> -----Ursprüngliche Nachricht-----
> Von: Basant.Kukreja@Sun.COM 
> Gesendet: Mittwoch, 10. September 2008 08:56
> An: dev@httpd.apache.org
> Betreff: Re: svn commit: r691418 [2/2] - in 
> /httpd/httpd/trunk: ./docs/manual/mod/ modules/filters/
> 

> I investigated further. I wrote a test file having binary 
> character from 0 to 31:
> $ od -c out.txt
> 0000000  \0  \n 001  \n 002  \n 003  \n 004  \n 005  \n 006  
> \n 007  \n
> 0000020  \b  \n  \t  \n  \n  \n 013  \n  \f  \n  \r  \n 016  
> \n 017  \n
> ...
> 
> And a small sed script :
>  $ cat one.sed
> l
> d
> 
> Sed script just runs the "l" command for each line.
> $ /usr/ucb/sed -f one.sed out.txt  > out1.txt
> 
> Here is the output of out1.txt
> $ od -c out1.txt
> 0000000  \n   \   0   1  \n   \   0   2  \n   \   0   3  \n   
> \   0   4
> 0000020  \n   \   0   5  \n   \   0   6  \n   \   0   7  \n   
> -  \b   <
> 0000040  \n   -  \b   >  \n  \n  \n   \   1   3  \n   \   1   
> 4  \n   \
> 0000060   1   5  \n   \   1   6  \n   \   1   7  \n   \   2   
> 0  \n   \
> ...
> 
> $ cat out1.txt
> \01
> \02
> \03
> \04
> \05
> \06
> \07
> <
> >
> 
> 
> \13
> \14
> 
> -------------------------------------------
> 
> So for some strange reason :
> 0x8 is converted to "-\b<" and
> 0x9 is converted to "-\b>"
> 
> That's what we see in "trans" variable.
> 
> Do you think it could be a bug in original sed and should we 
> correct it? 

I guess it is a bug in original sed and it should be corrected.
IMHO it should be suffient to replace

-\b<

and

-\b<

with

<

and

>

> 
> It should probably print "\10" and "\11".

This would be an option, but  I wouldn't get this far. It is still fine with me
to print < and >.

> 
> BTW /usr/bin/sed have the exactly the same behavior. 
> 
> It sound strange though that this was never caught in sed code.

Some issues last longer than other ones :-)

Regards

Rüdiger


Mime
View raw message