Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^2: Converting utf-8 to base64 and backby LanX (Saint) |
on Jan 22, 2017 at 00:49 UTC ( [id://1180103]=note: print w/replies, xml ) | Need Help?? |
Thanks I just realized it. (was compiling an answer but YOU were faster ;) It's confusing
updateand my initial example didn't fail because Ä is not a wide character (code-point <256), while ř (code-point 345) is.
Cheers Rolf
updatefrom Encode#Basic-methods > CAVEAT: When you run $octets = encode("utf8", $string) , then $octets might not be equal to $string. Though both contain the same data, the UTF8 flag for $octets is always off. When you encode anything, the UTF8 flag on the result is always off, even when it contains a completely valid utf8 string. See The UTF8 flag below. so it's even more complicated encode_utf8 does convert into utf8 but w/o flag ..
In Section
Seekers of Perl Wisdom
|
|