Subject: | charset problem |
Date: | Wed, 21 Jan 2009 21:45:19 +0100 |
To: | <bug-XML-LibXML [...] rt.cpan.org> |
From: | "Ursula Prager-Ramsa" <ulli [...] prager.at> |
Hello ,
XML::libXML : Version 1.69
Perl: v5.8.8 built for i386-linux
Linux imdcl1 2.6.15-1.2054_FC5smp #1 SMP Tue Mar 14 16:05:46 EST 2006 i686 i686 i386 GNU/Linux
Libxml: 2.7.2
I have a parser problem.
Using the following statements:
$parser = XML::LibXML->new();
my $out ='<?xml version="1.0" encoding="utf-8"?>'."\n".'<root>';
$out .="<xxx>\xc3\x96</xxx>\n";
$out .="<art>$art</art>\n";
$out .=XMLout(\@daten_cc,AttrIndent=>1,NoAttr=>1,RootName=>'cc');
...
$out .='</root>';
my $tree = $parser->parse_string($out);
print $tree->toString;
at this point I get sometimes the correct xml-string :
<?xml version="1.0" encoding="utf-8"?>
<root><xxx>Ö</xxx>
<art>liste</art>
...
And sometimes :
<?xml version="1.0" encoding="utf-8"?>
<root><xxx>Ã-</xxx>
<art>aendern</art>
...
It seems that the encoding information is ignored and I have no idea what to do. This behavior ist not restricted to this version of XML::libXML. I have this problem since several month (with older versions).
Anything I can do?
Kind regards
Ursula Prager-Ramsa