note
BrowserUk
<blockquote><i>no warnings qw( pack );</i></blockquote>
<p>So, you'd have us throw away all the useful warnings that [pack] can emit when I do something wrong in order to disable the stupid warning emitted when <i>it</i> does something wrong. Cool-io. Not.
<blockquote><i>You're getting an overflow warning. </i></blockquote>
<p>Oh sure. <i>"Wide character"</i> says 'overflow', like super-injunction says right to privacy for all.
<blockquote><i>It has nothing to do with Unicode.</i></blockquote>
<p>Really? Can you guess where this direct quote <i>" A Unicode character number."</i> comes from?
<p>I don't give flying fig whether you want to conflate the term 'unicode' with that multiplicitous cock-up of formats that hide behind the moniker 'The Unicode Standard'(*), and can't see that I used the former as a short-hand for 'multi-byte character sets'.
<p><small>Which should of course be 'The Multicode Standards:Everything including the (7 different) kitchen sinks'</small>
<blockquote><i>
* — Not even "U" has any understanding of Unicode.
>perl -wE"say sprintf '%X', unpack 'U', pack 'U', 0x200000"
200000
</i></blockquote>
<p>Wadday'know. If you pack with U and unpack with U you get back what you packed. D'uh. A pointless example of nothing much.
<p>This is the problem.<code>
perl -wE"$s=pack 'U*', 257; say length $s; print for unpack 'C*', $s;"
1
257
</code>
<p>That totally devalues the purpose of having two different template characters.
<ul><li>one for <c>C An unsigned char (octet) value.</c>
</li><li>one for <c>U A Unicode character number. Encodes to a character in character mode and UTF-8 ... in byte mode.</c>
</li></ul>
<p><b>That should not happen.</b> And I shouldn't have to state that I don't want it to happen:<code>
>perl -Mbytes -wE"$s=pack 'U*', 257; say length $s; say for unpack 'C*', $s;"
2
196
129
</code>
<P>It breaks backward compatibility in the very worst way.
<ul><li>Screaming when you are doing nothing wrong.
<p>Breaking both existing, working code and existing expectations. And causing people to disable important and useful warnings to silence it.
</li><li>And saying nothing at all when it does it wrong thing.
<p>Just silently breaking previously working, 'best practice' code violating every expectation and rule of change and enhancement.
</li></ul>
<p>The Unicode Standard is a cock-up. And the Perl implementation worse.
<div class="pmsig"><div class="pmsig-171588">
<hr />
<font size=1 >
<div>Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.</div>
<div>"Science is about questioning the status quo. Questioning authority". </div>
<div>In the absence of evidence, opinion is indistinguishable from prejudice.</div>
</font>
</div></div>
906373
906418