>>107833842
I'll try to explain...
Perl string are treated as a sequence of characters. If the UTF8 flag is off, each character correspond to a byte that can have any value in 0x00..0xff. If the flag is on, characters can have an ordinal value > 0xff and each character can be represented by several bytes internally. I think the internal representation is similar to UTF8 but is not quite UTF8. The intended purpose is that a character represents a unicode codepoint but it can be almost anything. The UTF8 flag is on if any character is > 0xff, otherwise it's off.
perl -E 'use Devel::Peek; Dump chr(0xff)'
perl -E 'use Devel::Peek; Dump chr(0x100)'
perl -E 'use Devel::Peek; Dump chr(0xffffffff)' # ok
perl -E 'use Devel::Peek; Dump chr(0x7fffffffffffffff)' # ok
perl -E 'use Devel::Peek; Dump chr(0xffffffffffffffff)' # error