<?xml version="1.0" encoding="windows-1252"?>
<node id="94713" title="Re: XML::Parser multilanguage support" created="2001-07-07 09:45:15" updated="2005-07-19 14:08:39">
<type id="11">
note</type>
<author id="16834">
OeufMayo</author>
<data>
<field name="doctext">
&lt;p&gt;You need to add the encoding used in the document at the start of it: &lt;code&gt;&lt;?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?&gt;&lt;/code&gt;. The entities are then converted to the proper numerical entities.&lt;/p&gt;

&lt;p&gt;You may also want to use [mirod]'s [cpan://XML::Twig], which, in the
latest version (3.0) is able to keep the original encoding. And besides this cool feature, I find Twig easier to use than DOM to process XML docs. Here's what your code would look like with Twig:
&lt;code&gt;
#!/usr/bin/perl -w
use strict;
use XML::Twig 3.0;

my $parser = new XML::Twig( keep_encoding =&gt; 1 );
my $xmlstring=&lt;&lt;"XMLEND";
&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
&lt;ACTION&gt;
	&lt;INPUT LABEL="Radio Button"/&gt;
	&lt;INPUT LABEL="été"/&gt;
	&lt;RADIO ID="List"&gt;
		éééàààùùù
	&lt;/RADIO&gt;
&lt;/ACTION&gt;
XMLEND
$parser-&gt;parse($xmlstring);
$parser-&gt;print;
&lt;/code&gt;

&lt;p&gt;Hope this helps!&lt;/p&gt;

&lt;p&gt;&lt;small&gt;&lt;strong&gt;update:&lt;/strong&gt; version 3.0 of XML::Twig can be found [http://www.xmltwig.cx/xmltwig/|here]&lt;/p&gt;

&lt;kbd&gt;-- &lt;br&gt;
my $&lt;a href="/index.pl?node=OeufMayo&amp;lastnode_id=1072"&gt;OeufMayo&lt;/a&gt; = new PerlMonger::Paris({http =&gt; '&lt;a href="http://paris.mongueurs.net"&gt;paris.mongueurs.net&lt;/a&gt;'});&lt;/kbd&gt;</field>
<field name="root_node">
94708</field>
<field name="parent_node">
94708</field>
</data>
</node>
