Perl should never treat a number as a 'wide character' without explicit notification from the programmer that that is his intent.

Judging by your example, I think you mean you don't want wide character to automatically get encoded to UTF-8. (Correct me if I'm wrong.)

What do you propose instead? I can think of a couple.

The term 'character' has no meaning outside of some mapping.

Characters have no meaning outside a mapping, but the term does. It's simply the basic unit of a string.

And even when it can be so mapped, until it is mapped, it is still just a number.

I fully agree. That's why I said pack doesn't deal with Unicode. It just deals with numbers. So do chr, ord, substr, index, etc.

Operators that do use mappings are lc, \d in regex patterns, etc.

And 4294967296, much less 18446744073709551616 cannot be mapped to 'a character' in any known or proposed mapping.

No, but 4294967295 is a valid character.

>perl -E"say ord chr 4294967295" 4294967295

Perl uses utf8 (not to be confused with UTF-8), an encoding whose charset consist of 2**72 characters. Only up to UVMAX is supported, though.

Unicode support in Perl is broken.

I'm not going to discuss this because this thread has nothing to do with Unicode.

The OP tried to send non-bytes to a file handle, and you tried to store something larger than a byte in a byte. A warning and dying aren't unwarranted.


In reply to Re^6: Simplest Possible Way To Disable Unicode by ikegami
in thread Simplest Possible Way To Disable Unicode by JapanIsShinto

Title:
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, details, 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, summary, 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.