Serious Problem with special characters and multi-languages
<p>I created a simple comment wall that submits using ajax.</p>

<p>Using javascript i collect user input:</p>

<pre><code>var sharetxt =  encodeURIComponent(document.getElementById("cw_share_txt").value);
</code></pre>

<p>then pass it to a php page, on the php page, i collect the passed data:</p>

<pre><code>$text=nl2br(htmlentities(trim(utf8_decode($_POST["txt"]))));
</code></pre>

<p>Encoding of the php page above:</p>

<pre><code>header("Content-Type: text/xml; charset=utf-8");
</code></pre>

<p>My problem is that </p>

<ol>
<li><p>the wall doesnt still support multi languages (displays as ???? and causes my xml not to work)</p></li>
<li><p>i still problems with some special characters (displays as Ã¢Â�Â� or ?)</p></li>
</ol>

<p><strong>What am i not doing right? please assist</strong></p>
