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

Owner: Nobody in particular
Requestors: SREZIC [...]

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 Regards, Slaven
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 infrastructure.

Please report any issues with to