![]() |
|
The stupid question is the question not asked | |
PerlMonks |
Re^3: Binary value of stringby BrowserUk (Patriarch) |
on Jul 11, 2011 at 20:07 UTC ( #913765=note: print w/replies, xml ) | Need Help?? |
If you use "W" with unpack, then it will behave the same as ord. Is there any point in checksumming using unicode ordinals? Sum-the-bytes checksums are pretty useless -- you can perform any transpositions, shuffle or reverse the entire string and detect nothing -- that's why CRC's and Adler etc. were invented. The only (scant) merit of sum-the-bytes is that it is very fast. What would be achieved by slowing that to a crawl by forcing it to pick its way through the technical abortion that is multi-byte character encodings? You certainly aren't going to gain any greater guarantee of integrity. My gut feel is that as the are so many different "unicode standard" encodings out there in the wild, the chances of getting false positives from undetected transmission errors using sum-the-ordinals values, is far higher then using sum-the-bytes values. Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section
Seekers of Perl Wisdom
|
|