Skip Menu |
 

This queue is for tickets about the XML-LibXML CPAN distribution.

Report information
The Basics
Id: 39178
Status: resolved
Priority: 0/
Queue: XML-LibXML

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.66
Fixed in: (no value)



Subject: "Invalid expression" error when using utf-16
Download (untitled) / with headers
text/plain 386b
Using the findnodes method on a XML document originally encoded as utf-16 leads to an "Invalid expression" error. See the attached sample script and XML files. There's no problem if the XML file was converted into utf-8, or even using setEncoding("utf-8") seems to fix the problem. This was observed on a Debian Linux system with perl 5.8.8 and libxml2.so.2.6.32. Regards, Slaven
Subject: bla6.pl
Download bla6.pl
text/x-perl 194b
#!/usr/bin/perl use XML::LibXML; my $p = XML::LibXML->new; my $doc = $p->parse_file("utf-16-2.cml"); #$doc->setEncoding('utf-8'); # "fixes" the problem my @nodes = $doc->findnodes("/cml/*");
Subject: utf-16-2.cml
Download utf-16-2.cml
chemical/x-cml 254b

Message body not shown because it is not plain text.

Download (untitled) / with headers
text/plain 130b
I can reproduce the problem with 1.66, but not with the SVN version. I'm closing this and adding your test to the regression set.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.