> Perl expects source encoded using UTF-8 when use utf8; is in effect.
> Perl expects source encoded using ASCII when use utf8; isn't.
I don't think that's a very helpful way of looking at it. I'd say "Perl upgrades any literal strings in (utf-8) source code to character semantics when use utf8; is in effect" would be more helpful.
In the end, it's about whether the strings you are working with are using byte semantics or character semantics. Because binmode ":encoding()" only works with strings with character semantics and does nothing with byte semantics.
It takes some work to get used to this byte/character semantics distinction.
In reply to Re^2: binmode(':encoding(UTF-8)') did not produce utf8 for me
by Anonymous Monk
in thread binmode(':encoding(UTF-8)') did not produce utf8 for me
by hexcoder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |