Hi,
The first script segfaults and here is the output of the 2nd script:
SV = PV(0x813b4a0) at 0x813b360
REFCNT = 1
FLAGS = (POK,pPOK,UTF8)
PV = 0x8140dc8 "\342\200\231\260"\0Malformed UTF-8 character
(unexpected continuation byte 0xb0, with no preceding start byte) in
subroutine entry at test.pl line 7.
[UTF8 "\x{2019}\x{0}"]
CUR = 4
LEN = 9
I'm using perl 5.8.5 on a linux machine, and yes, I do have the support
to decode unicode entities turned on. If I have it turned off, the
segfault doesn't happen.
(output if turned off:
SV = PV(0x813b4a0) at 0x813b360
REFCNT = 1
FLAGS = (POK,pPOK)
PV = 0x8140dc8 "\342\200\231\260"\0
CUR = 4
LEN = 9
)
Thibaut
On Tue, 2004-11-09 at 15:22 +0100, Gisle Aas wrote:
> Thibaut Britz <[EMAIL PROTECTED]> writes:
>
> > the following produces a segfault using the latest version of libwww.
>
> I see segfaults with ActivePerl 810 but not with our latests builds.
> What version of perl are you using? The segfault appears to be a bug
> in perl I would like to find out if the problem has really been fixed.
>
> > As it seems, HTML::Parser is marking non UTF8 strings as UTF8 strings.
>
> Did you enable the Unicode support when you installed HTML-Parser? It
> seems like this would be the only time this happens, but I want to be
> sure.
>
> > or to see it:
> >
> > #!/usr/bin/perl
> > use warnings;
> > use strict;
> > use Devel::Peek;
> > use HTML::Parser;
> > my $html = qq{<img title="’\260">};
> > my $p = HTML::Parser->new(api_version=>3,start_h=>[sub{Dump(shift-
> > >{title})}, "attr"]);
> > $p->parse($html);
>
> What output do you get?
--
Thibaut Britz <[EMAIL PROTECTED]>