<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" version="2.0">
  <channel>
    <title>Recent Posts in 'XML encoding issues' | sgForums.com</title>
    <link>http://www.sgforums.com/forums/2250/topics/322868</link>
    <language>en-US</language>
    <ttl>60</ttl>
    <atom:link rel="search" type="application/opensearchdescription+xml" href="http://www.sgforums.com/open_search.xml"/>
    <description></description>
    <item>
      <title>XML encoding issues replied by LatecomerX @ Wed, 02 Jul 2008 20:39:29 +0800</title>
      <description>&lt;p&gt;Once again, change the encoding of the XML file to UTF-8.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
      <pubDate>Wed, 02 Jul 2008 20:39:29 +0800</pubDate>
      <guid isPermaLink="false">www.sgforums.com:2250:322868:8212791</guid>
      <author>LatecomerX</author>
      <link>http://www.sgforums.com/forums/2250/topics/322868</link>
    </item>
    <item>
      <title>XML encoding issues replied by Trcyng @ Wed, 02 Jul 2008 14:55:54 +0800</title>
      <description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am doing a &lt;span class=""&gt;XML&lt;/span&gt; file with chinese and
korean characters.&lt;/p&gt;
&lt;p&gt;It was fine when it was in English but when inserting the
chinese characters, it has errors;&lt;/p&gt;
&lt;p&gt;Warning: SimpleXMLElement::&lt;i&gt;construct()
[function.SimpleXMLElement&#8212;-construct]: Entity: line 98: parser
error : Premature end of data in tag description2 line 98 in
C:\Program Files\xampp\htdocs\plaincart\parselangxml.php on line
4&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;Warning: SimpleXMLElement::construct()
[function.SimpleXMLElement&#8212;-construct]: t and in the mean time,
pursuing and promoting interest of local food to even mo in
C:\Program Files\xampp\htdocs\plaincart\parselangxml.php on line
4&lt;/p&gt;
&lt;p&gt;Fatal error: Uncaught exception &#8216;Exception&#8217; with message &#8216;String
could not be parsed as &lt;span class=""&gt;XML&lt;/span&gt;&#8217; in C:\Program
Files\xampp\htdocs\plaincart\parselangxml.php:4 Stack trace: #0
C:\Program Files\xampp\htdocs\plaincart\parselangxml.php(4):
SimpleXMLElement-&amp;gt;__construct(&#8216;&amp;lt;?xml
version=&#8221;...&amp;amp;#8217&lt;img title="Wink" src=
"/images/emoticons/classic/icon_wink.gif" alt="Wink" /&gt; #1
C:\Program Files\xampp\htdocs\plaincart\index.php(4):
include(&#8216;C:\Program File&#8230;&amp;amp;#8217&lt;img title="Wink" src=
"/images/emoticons/classic/icon_wink.gif" alt="Wink" /&gt; #2 {main}
thrown in C:\Program Files\xampp\htdocs\plaincart\parselangxml.php
on line 4&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;I know that it has to do with the encoding but upon trying all
standards, it remains the same. Anyway, this is my parsexml
file;&lt;/p&gt;
&lt;p&gt;&amp;lt;?php&lt;/p&gt;
&lt;p&gt;$xmlFileData = file_get_contents(&#8220;lang.xml&amp;amp;#8221&lt;img title=
"Wink" src="/images/emoticons/classic/icon_wink.gif" alt=
"Wink" /&gt;;&lt;br /&gt;
$xmlData = new SimpleXMLElement($xmlFileData);&lt;/p&gt;
&lt;p&gt;if ($_COOKIE[&#8216;cookieLanguage&#8217;] != &#8221;&amp;amp;#8221&lt;img title="Wink"
src="/images/emoticons/classic/icon_wink.gif" alt="Wink" /&gt; {&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;$lang_choice = $_COOKIE['cookieLanguage'];&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;}&lt;br /&gt;
else {&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;$lang_choice = "English";&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;$i = 0;&lt;br /&gt;
while($xmlData-&amp;gt;language[$i]-&amp;gt;type != $lang_choice) {
$i++;&lt;br /&gt;
} // end foreach&lt;/p&gt;
&lt;p&gt;$lang = $xmlData-&amp;gt;language[$i];&lt;/p&gt;
&lt;p&gt;?&amp;gt;&lt;/p&gt;
&lt;p&gt;Could anyone help me?&lt;/p&gt;</description>
      <pubDate>Wed, 02 Jul 2008 14:55:54 +0800</pubDate>
      <guid isPermaLink="false">www.sgforums.com:2250:322868:8212165</guid>
      <author>Trcyng</author>
      <link>http://www.sgforums.com/forums/2250/topics/322868</link>
    </item>
  </channel>
</rss>
