Bug#324882: libxml-dom-perl: ignores encoding on output
Martín Ferrari
martin.ferrari at gmail.com
Mon Mar 3 03:12:30 UTC 2008
On Sun, Mar 2, 2008 at 11:50 PM, Glenn Maynard <g_deb at zewt.org> wrote:
> getAttribute() is still entities incorrectly, which is where I had
> problems. In UTF-8, even with use utf8, this prints the raw byte 0xE4:
>
> #!/usr/bin/perl;
> use strict;
> use warnings;
> use utf8;
> use XML::DOM;
>
> my $parser = new XML::DOM::Parser;
> my $doc = $parser->parse('<?xml version="1.0" encoding="UTF-8"?><blah x="test: ä"/>');
> print $doc->getDocumentElement->getAttribute("x");
I'm not following the bug, but want to tell you that even if you "use
utf8" the default encoding for STDOUT and STDIN is latin1, so it's
normal that you're seeing the raw 0xE4.
My 2¢.
--
Martín Ferrari
More information about the pkg-perl-maintainers
mailing list