Possible bug in XML::SAX causing new_from_xml() to croak
[email protected] (Joshua Ferraro)
| Newsgroups | perl.perl4lib |
|---|---|
| Organization | LibLime Library Solutions |
| Message-ID | <[email protected]> |
Hi all, OK ... I think I've narrowed down the problem to a bug in XML::SAX when dealing with combining characters, but I'd like some feedback before I go and post this bug ... I'm new to SAX and XML parsing/ encoding issues in general ... I've attached a small script that reproduces the same error we're getting in the new_from_xml() method. Try it out and see what it does for you. So ... Is there a workaround that we can use to fix the MARC::Record suite so that it won't crash when dealing with records that have combining characters ... shall I bug the maintainer? Cheers, -- Joshua Ferraro VENDOR SERVICES FOR OPEN-SOURCE SOFTWARE President, Technology migration, training, maintenance, support LibLime Featuring Koha Open-Source ILS [email protected] |Full Demos at http://liblime.com/koha |1(888)KohaILS
parsercrash.pl
(text/plain, 431 B)
#!/usr/bin/perl
use XML::SAX;
my $parser = XML::SAX::ParserFactory->parser(
Handler => MySAXHandler->new
);
binmode STDOUT, ":utf8";
print "\x{65}\x{301}\n";
$parser->parse_string("<xml>\xEF\xBB\xBF\x{65}\x{301}</xml>");
package MySAXHandler;
use base qw(XML::SAX::Base);
sub start_document {
my ($self, $doc) = @_;
# process document start event
}
sub start_element {
my ($self, $el) = @_;
# process element start event
}