On 01/08/2007 12:53 AM, perl pra wrote:
Hi Guru,

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.


Did you put « <?xml version="1.0" encoding="ISO-8859-1"?> » at the top of the file. That works for me.


I need to change the file to UTF-8 format. If I include encoding="UTF-8" at
the top of xml file, Still I get XML read error.

Can somebody guide me to solve this.

Thanks in Advance,
PP


After I converted a sample XML file to utf-8 (using the recode utility), and after I changed the encoding line to "UTF-8", I had no problems reading the file using XMLin() from XML::Simple.

It's too bad you didn't show any data or program.

I know next to nothing about XML, but I went onto the Internet and found a tutorial that shows how to specify the encoding. Other than writing a simple program that uses XML::Simple, that's all I did to test out your problem.


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


Reply via email to