Steve_BZ has asked for the wisdom of the Perl Monks concerning the following question:
Hi Guys,
I seem to have a strange encoding bug when I use degrees C written like this: °C.
I have a function t("°C") which gives me an interpreter error:
Malformed UTF-8 character (unexpected continuation byte 0xb0, with no preceding start byte)
with double quotes. When I use single quotes, I get no interpreter error, but the function fails at the first database call. If I step through the code, the code hangs. If I execute it, I get a database error.
I'm using the statements:
use strict; use warnings; use utf8; use Encode; binmode STDOUT, ":utf8"; use open ':encoding(utf8)';
Any insight gratefully received.
Regards
Steve
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Malformed UTF-8 character
by moritz (Cardinal) on Apr 29, 2011 at 20:05 UTC | |
by Steve_BZ (Chaplain) on Apr 30, 2011 at 13:28 UTC | |
by moritz (Cardinal) on Apr 30, 2011 at 13:51 UTC | |
by Steve_BZ (Chaplain) on Apr 30, 2011 at 19:59 UTC | |
|
Re: Malformed UTF-8 character
by eff_i_g (Curate) on Apr 29, 2011 at 20:07 UTC | |
by Steve_BZ (Chaplain) on Apr 30, 2011 at 20:02 UTC | |
|
Re: Malformed UTF-8 character
by Eliya (Vicar) on Apr 29, 2011 at 20:16 UTC | |
by tchrist (Pilgrim) on Apr 30, 2011 at 16:31 UTC | |
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 |