At 12:09 AM 11/17/2001 -0500, Keith C. Ivey wrote:
>Michael G Schwern <[EMAIL PROTECTED]> wrote:
>> Hmmm, there seems to be a little problem:
>> 
>> $ perl -wle 'print "\n" =~ /[[:cntrl:]]/ ? "Yep" : "Nope"'
>> Yep
>> $ perl -wle 'print "\n" =~ /[[:print:]]/ ? "Yep" : "Nope"'
>> Yep
>> $ perl -Mutf8 -wle 'print "\n" =~ /[[:print:]]/ ? "Yep" :
>> "Nope"' Nope
>
>I missed that when I was testing.  There's the same problem 
>with "\t", "\f", and "\r" (ASCII 9, 12, and 13).  Perl seems to 
>think that anything that matches \s is printable, rather than 
>just space.
>
>-- 
>Keith C. Ivey <[EMAIL PROTECTED]>
>Washington, DC

"The Standard C Library" Plauger defines isprint() as "all characters
that occupy one print position when written to a printer".  Other
libraries define it as mentioned previously, graphic characters plus
space.  Both Plauger and Linux show it as punct|upper|lower|digit
plus "hard space" (0x20).

But... (I feel old) I've always thought of it as "printer actioning"
characters.  That is, anything that the printer specifically reacts
too.  This would include the above definitions, but also anything
that _moved_ the print-head (on, say, an old dot-matrix printer) or
that _moved_ the paper.  So horizontal and vertical tab characters, 
line feed and carriage return, form feed, and even backspace all
would qualify.

But... (I feel even older) that would explain why I've always been
out of step with the definition of isprint() in C.  And why Perl 
feels good?




-- 
When running in an IIS environment under heavy stress, ADO might start
returning empty recordsets to requests from the database.  This is not a
common problem because it often requires 4-15 days for the problem to surface.  
http://www.microsoft.com/data/MDAC21info/MDAC21sp2manifest.htm 

Reply via email to