Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Seeking Perl docs about how UTF8 flag propagatesby ikegami (Patriarch) |
on May 17, 2023 at 15:18 UTC ( [id://11152258]=note: print w/replies, xml ) | Need Help?? |
The UTF8 flag indicates which of two internal storage formats is being used. There's no documentation on the choice of internal storage format, because it's an internal detail. Perl is free to use the string storage format of its choice. If you need a specific storage format (i.e. to work around an instance of The Unicode Bug), then you can use utf8::upgrade or utf8::downgrade to ensure a specific storage format is used.
Neither operators nor subs can return arrays, just scalars. Functions refers to name operators in Perl. Operator will tend to output strings in the same storage format as their operands, but there's no requirement for this. Mixing strings of different formats usually results in an upgraded string, as this formats supports all strings. Returning strings from a sub should have no effect on their storage format.
In Section
Seekers of Perl Wisdom
|
|