Sorry, but I'm still gonna disagree with you.
An overflow isn't a change in meaning, it's a change in value.
No. The value (bitpattern) hasn't changed one iota. Only the meaning assigned to that value:
#! perl -slw use 5.010; use strict; use Inline C => Config => BUILD_NOISY => 1; use Inline C => <<'END_C', NAME => '_junk', CLEAN_AFTER_BUILD => 0; void doit( SV *dummy ) { int i = -1; unsigned int j = i; printf( "i: %d : %4x\n", i, i ); printf( "j: %u : %4x\n", j, j ); } END_C doit( 1 ); __END__ C:\test>junk ... i: -1 : ffffffff j: 4294967295 : ffffffff
And there is no "overflow" involved, as the full build log below dmonstrates. No warnings. Which makes it the perfect analogy for two identical strings of bytes, with differing setting of the SVf_UTF8 flag. Same value, different meaning. To Perl.
something I have agreed with.
Where? I've looked at the whole thread again and this:
It doesn't actually do the encoding,.
is the first time I can see.
but it's the only way you'll get the encoded version implicitly.
I've been pointing out right from the very beginning, that I'm not interested in getting "the encoded version", because there will never be an encoded version. Because I'm never going to call encode() on binary data that can never be safely or logically treated as any form of unicode.
In reply to Re^27: Interleaving bytes in a string quickly
by BrowserUk
in thread Interleaving bytes in a string quickly
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |