On Mon, 03 Mar 2008 01:12:30 -0200, Martín Ferrari 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.
Thanks. Sounds reasonable to me; and in this case getAttribute() and getValue() don't seem to print/convert anything. Anyway, could someone else from the Debian Perl Group with more insight into encodings and XML take a look at this, please? Cheers, gregor -- .''`. http://info.comodo.priv.at/ | gpg key ID: 0x00F3CFE4 : :' : debian: the universal operating system - http://www.debian.org/ `. `' member of https://www.vibe.at/ | how to reply: http://got.to/quote/ `- NP: Bob Dylan: Oh, Sister
signature.asc
Description: Digital signature