I have an xml file which contents special character like
<string>Jüri (Yuri)</string>
and when I am pass this xml through xml_parse()
it returns false, I am geting the value from database, how can I overcome this?
I have an xml file which contents special character like
<string>Jüri (Yuri)</string>
and when I am pass this xml through xml_parse()
it returns false, I am geting the value from database, how can I overcome this?
Either initialize the XML parser with the correct encoding, or specify the encoding within the XML file itself.
Specify the encoding type properly on your XML content. Something like this will do
<?xml version="1.0" encoding="utf-8"?>
or
<?xml version="1.0" encoding="ISO-8859-1" ?>
You can try wrapping the data with CDATA
tags.
<string><![CDATA[Jüri (Yuri)]]></string>