From: "perl pra" <[EMAIL PROTECTED]>
> I have a problem with reading xml file which has foriegn characters
> (like plutôt) using xml::Simple.
>
>
> I get xml read error.
>
>
> Then I included encoding=iso8859-1  at the top of xml file.
>
> I am able to read the xml file , but the characters are changed to
> plut?t instead of  plutôt, Because of this my test fails.

1) If the data in the file are in a different encoding than utf8 you
have to specify the encoding! So adding the encoding=iso8859-1 was
the right thing to do. The other option would be to create the XML in
utf8.

2) No matter what's the original encoding, the XML parser returns the
data in UTF8. If you want to print it somewhere and treat it as
iso8859-1 you have to transform it. See
        perldoc Encode

Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to