100% of that code was dealing with encoding. I was testing the encoding and decoding functions. You're conclusions are based on this being a representative program, and it's not.

But as a I mentioned earlier, I do concur there's room for simplification. If you would like tips on how to get started at making those changes, let me know.

Now Perl is completely obliterated by Unicode/UTF8|16 in the "doing the right thing" department.

The alternative is that Perl would only work with single-byte encodings.

It's not trying to "do the right thing", it's simply trying to work. Because it had to be converted from working with single-byte encodings, that's hard, but the problems are being worked out. You should see Java with chars above U+FFFF, and Java was designed with Unicode in mind from the start!

Now suddenly, instead of following process logic, I have to be worrying about what format strings are?!

No, you don't, not unless you write XS. I wish people would stop bringing it up. Especially since those that do usually get it wrong.


In reply to Re^7: Mugged by UTF8, this CANNOT be right by ikegami
in thread Mugged by UTF8, this CANNOT be right by tosh

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.