in reply to Malformed UTF-8 character
Others have explained why Perl complains — in case the string literal is declared with double quotes, at least. In other words, your source is apparently not encoded in UTF-8, as you're telling Perl with the pragma use utf8.
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 replicate the issue here with 5.12.2.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Malformed UTF-8 character
by tchrist (Pilgrim) on Apr 30, 2011 at 16:31 UTC | |
|
Re^2: Malformed UTF-8 character
by Steve_BZ (Chaplain) on Apr 30, 2011 at 13:23 UTC | |
by Eliya (Vicar) on Apr 30, 2011 at 13:45 UTC | |
by Steve_BZ (Chaplain) on Apr 30, 2011 at 20:03 UTC |