"be consistent" | |
PerlMonks |
Re^9: Seeking Perl docs about how UTF8 flag propagatesby LanX (Saint) |
on May 17, 2023 at 10:21 UTC ( [id://11152245]=note: print w/replies, xml ) | Need Help?? |
So you mean the OP didn't intend to ask if the flag is switched but if there are cases of automatic (undocumented) decoding or encoding? I would consider any such encoding a bug. I can't see a rational for degrading from text to binary, unless you use a bit oriented operator. Decoding from binary to text can happen, like if a transformation like lc or uc can't map otherwise.° But that's documented and can be configured too, AFAIR. And to be honest, treating a binary string as ASCII/Latin-1 is guesswork from Perl, it could be anything. Strictly speaking lc and uc shouldn't be allowed then, the programmer should have properly decoded it first.
Cheers Rolf °) or generally if only utf8-text characters are added.
In Section
Seekers of Perl Wisdom
|
|