develooper Front page | perl.perl5.porters | Postings from May 2014

Re: RFC: Making -B and -T work better on 8-bit encodings

Thread Previous | Thread Next
From:
bulk88
Date:
May 10, 2014 21:50
Subject:
Re: RFC: Making -B and -T work better on 8-bit encodings
Message ID:
BLU436-SMTP24164AD19A1CC80AFC81588DF4B0@phx.gbl
Karl Williamson wrote:
> It seems to me that by lowering the ratio so that greater than about 
> 15-20% non-text cause the file to be classified as binary, while 
> expanding the text characters by the 95 upper Latin1 printable 
> characters (except for \xFF) will give good results, better than the 
> existing.

Why do we use percent cutoffs in the first place? Either it is 
printable/glyphable or its not. perlfunc does document the %s behavior, 
so I would guess ANY change to the algorithm would break backcompat for 
the few people willing to use such an unreliable algo. I would suggest 
to leave it alone as a backcompat/legacy/obsolete feature, or deprecate 
and remove -T/-B and tell people to use CPAN/something smarter for their 
specific purpose.

Being purely printable doesn't mean a string/data is risk free but a 
fixed set of rules is better than a % "guess".

http://www.blackhatlibrary.net/Shellcode/Null-free
http://www.blackhatlibrary.net/Ascii_shellcode

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About