Think about Loose Coupling | |
PerlMonks |
Re^4: How does the built-in function length work?by ikegami (Patriarch) |
on Dec 02, 2011 at 21:48 UTC ( [id://941439]=note: print w/replies, xml ) | Need Help?? |
Not at all. If it must assume an encoding, and that encoding is iso-8859-1 for
then what encoding is assumed for the following?
It never deals with any encoding. It always deals with string elements (characters). And those string elements (characters) are
It's entirely up to you to create a string with the right elements, which may or may not involve character encodings.
A Unicode code point, regardless of the state of the UTF8 flag.
In short, you're over complicating things. It's NOT: Each character is expected to be an iso-8859-1 byte if UTF8=0 or a Unicode code point if UTF8=1. It's simply: Each character is expected to be a Unicode code point.
In Section
Seekers of Perl Wisdom
|
|