XML::Twig produces double encoded UTF-8
- From: Josef Feit <jfeit@xxxxxxxxxxx>
- Date: Thu, 4 Jan 2007 20:36:30 GMT
Hi,
I have problem with XML::Twig (Fedora 6).
When parsing and UTF-8 encoded xml file, I am getting double encoded file in the output.
The header is
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE PICTURELIST SYSTEM "dtd/obrazky.dtd">
<!-- p: LANG - defaultni kod jazyka pro TXT -->
and the XML::Twig is build by
my $t= XML::Twig->new(
keep_encoding => 1,
twig_handlers =>
{ PICTURE => \&picture,
},
);
$t->parsefile($xmlobr);
$t->purge;
------------------
The picture sub uses print to output some parts of the "picture" (which is xml structure, no binaray) to STDOUT.
No matter of the keep_encoding option (even if left out) the problem persists.
Is there any other way to tell the parser to keep the encoding untouched?
Thanks,
Josef
.
- Follow-Ups:
- Re: XML::Twig produces double encoded UTF-8
- From: Big and Blue
- Re: XML::Twig produces double encoded UTF-8
- From: mirod
- Re: XML::Twig produces double encoded UTF-8
- Prev by Date: Apache2::RequestIO::read: timeout error
- Next by Date: Re: Module for manipulating JPEG image
- Previous by thread: Apache2::RequestIO::read: timeout error
- Next by thread: Re: XML::Twig produces double encoded UTF-8
- Index(es):