in reply to Re^6: Mugged by UTF8, this CANNOT be right
in thread Mugged by UTF8, this CANNOT be right

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.

  • Comment on Re^7: Mugged by UTF8, this CANNOT be right