The stupid question is the question not asked | |
PerlMonks |
Re: Why does perl's internal utf8 seem to allow single-byte latin1?by ikegami (Patriarch) |
on Mar 24, 2010 at 03:30 UTC ( [id://830440]=note: print w/replies, xml ) | Need Help?? |
Your expectations are wrong for ustring1. There's nothing that caused it to be changed to the less efficient storage format. utf8::is_utf8 pointed this out, and pointed out your expectations were accurate for ustring2 and ustring3. print_chrcode doesn't look at the internal format. It looks at the content of the string. That's why it didn't tell you anything.
( The previous paragraph is wrong if you happen to use the buggy version of Perl the OP is using. I didn't notice the OP had included the output of this program. With 5.10, you get
utf8::upgrade and utf8::downgrade are used to switch between the two internal formats.
All that being said, I have no idea what you are trying to accomplish. Sounds very very wrong.
In Section
Seekers of Perl Wisdom
|
|