in reply to XML::SAX UTF-8 segfault

As I understand it, utf8 is the default for SAX for 5.8 and later; so I don't think the encoding is the problem. I ran your script, and I got a few "read" errors for XML::LibXML and XML::LibXML::SAX. They weren't loaded. I played with it and got this:

#!/usr/bin/perl use strict; use warnings; use XML::SAX::ParserFactory; use XML::LibXML::SAX; $XML::SAX::ParserPackage = "XML::LibXML::SAX"; my $handler = XML::LibXML::SAX->new(); my $p = XML::SAX::ParserFactory->parser(Handler => $handler); $p->parse_uri("http://junk.sixtease.net/train.m.xml");

Replies are listed 'Best First'.
Re^2: XML::SAX UTF-8 segfault
by Sixtease (Friar) on Jan 26, 2007 at 16:16 UTC
    Wow, after decomposing the differences between your and my code... I found that I get a segfault when I open the XML file with '<:encoding(utf8)' and it runs normally when I open it with '<'.

    I don't have a clue what's going on here and I think it's pretty sick :-) but I am more grateful than I can say.
    Thank you friend.