http://www.perlmonks.org?node_id=902212


in reply to Re: Malformed UTF-8 character
in thread Malformed UTF-8 character

Eliya wrote:
What I find more surprising is that Perl doesn’t complain when — within the scope of use utf8 — the string literal (containing a Latin‑1 encoded char like '°') is declared using single quotes. I’d say the latter is a bug (unless I've overlooked something in the docs... :)

I can confirm it still occurs in 5.14 RC0:

% blead -C0 -le 'print qq(print "\xB0C";)' | blead -Mutf8 -CS -l Malformed UTF-8 character (unexpected continuation byte 0xb0, with no +preceding start byte) at - line 1. C % blead -C0 -le 'print qq(print \x27\xB0C\x27;)' | blead -Mutf8 -CS -l #C
Oops.