Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
no warnings qw( pack );

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 it does something wrong. Cool-io. Not.

You're getting an overflow warning.

Oh sure. "Wide character" says 'overflow', like super-injunction says right to privacy for all.

It has nothing to do with Unicode.

Really? Can you guess where this direct quote " A Unicode character number." comes from?

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'.

Which should of course be 'The Multicode Standards:Everything including the (7 different) kitchen sinks'

* Not even "U" has any understanding of Unicode. >perl -wE"say sprintf '%X', unpack 'U', pack 'U', 0x200000" 200000

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.

This is the problem.

perl -wE"$s=pack 'U*', 257; say length $s; print for unpack 'C*', $s;" 1 257

That totally devalues the purpose of having two different template characters.

  • one for C   An unsigned char (octet) value.
  • one for U   A Unicode character number.  Encodes to a character in character mode and UTF-8 ... in byte mode.

That should not happen. And I shouldn't have to state that I don't want it to happen:

>perl -Mbytes -wE"$s=pack 'U*', 257; say length $s; say for unpack 'C* +', $s;" 2 196 129

It breaks backward compatibility in the very worst way.

  • Screaming when you are doing nothing wrong.

    Breaking both existing, working code and existing expectations. And causing people to disable important and useful warnings to silence it.

  • And saying nothing at all when it does it wrong thing.

    Just silently breaking previously working, 'best practice' code violating every expectation and rule of change and enhancement.

The Unicode Standard is a cock-up. And the Perl implementation worse.

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 reply to Re^3: Simplest Possible Way To Disable Unicode by BrowserUk
in thread Simplest Possible Way To Disable Unicode by JapanIsShinto

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others cooling their heels in the Monastery: (1)
    As of 2021-04-18 00:40 GMT
    Find Nodes?
      Voting Booth?

      No recent polls found