On Fri, Nov 29, 2002 at 10:27:05PM -0600, Jonathan Sharp wrote:
>
> Is there a way to determine if a string has ascii or binary data in it?
You could always see if it matches a regular expression that represents
the ascii range you're considering. I.e., ereg('[^a-zA-Z0-9]',$string)
will return true if non-alphanumerics are in the string.
Remember that a string is just a string. Whether the data contained in
it is represented as ASCII or something else is completely a matter of
implementation. ALL 7-bit data can be represented as ASCII. All 8-bit
data can be represented as "IBM Extended ASCII" or whatever you want to
call it. But the string is just a string of bits.
--
Paul Chvostek <[EMAIL PROTECTED]>
Operations / Abuse / Whatever +1 416 598-0000
it.canada - hosting and development http://www.it.ca/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php