|We don't bite newbies here... much|
Re^2: Character in 'b' format wrapped in unpackby BrowserUk (Pope)
|on Mar 29, 2015 at 06:06 UTC||Need Help??|
when you pass a numeric value greater than 255 to chr, it must return a wide character.
There is no "must" about it. It should be the case that unless I specifically ask for Unicrap, characters should be assumed to be 8-bits.
I'm afraid I don't quite understand the reason(s) for what happens when the "use bytes" pragma is added -- if I've done it right, the only difference is to eliminate the warning message about the "wrapped character in unpack"
You're right. It does just enough to lull you into a false sense of security; then sneaks around behind and kicks you in the nuts!
People complain about the effects that the inclusion of threads has on code for those that don't use them -- a modest increase in executable size and a few single digits of outright performance in tests deliberately designed to show it -- but the deleterious affects of the inclusion of Unicrap are far more pervasive and damaging.
Not only does it bloat the source code and executable, and hit the performance of just about every operation even when your not using it; it subtly (and often silently) changes the semantics of code that isn't even text processing; let alone Unicrap processing.
But then some bright spark came along and decided he could make it transparent; and now we're all f*****!
Is it the case that you got the particular pattern of zeros and ones you expected, and were just complaining about the warning message?)
No. I wanted the shift to discard the high bit, as it does with integers:
Unfortunately, Unicrap (and Perl's implementation of Unicrap) conspire such that you can no longer rely upon simple byte semantics.
The idea that a string (a good old array of bytes) can suddenly contain a random Unicrap character in a program that doesn't (and doesn't want to) use any Unicrap, is a farce!
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
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". I'm with torvalds on this
In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked