I don't have so clear the phrase "binary safe"
function.
Is a binary safe function one that will correctly
recognize all data, rather than only ASCII text?
Can anyone explain me what a binary safe function is
or where can I find this concept explained.
Thanks.
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
>I don't have so clear the phrase "binary safe"
>function.
>
>Is a binary safe function one that will correctly
>recognize all data, rather than only ASCII text?
I think you already got it :)
All "regular" ASCII characters (the ones you can type on an English
keyboard) have numbers less than 128. Eg
a = 97 = 01100001
A = 65 = 01000001
% = 37 = 00100101
As you can see, all these characters have their first bit set to 0.
The binary characters that give some software problems are those ASCII
characters above 128 (those with their first bit set to 1), and \0
(00000000).
\0 is included because in many languages (those descended from C), \0
signifies the end of a string.
Binary-safe code is code you can throw any ASCII value at, including those
>128 and \0, and it will work correctly.