Problem With Special Characters And Multilanguages - Webmasters - Nairaland
Nairaland Forum › Science/Technology › Webmasters › Problem With Special Characters And Multilanguages (725 Views)
| Problem With Special Characters And Multilanguages by ogzille(op): 11:51am On Aug 19, 2010 |
I created a simple comment wall that submits using ajax. Using javascript i collect user input: var sharetxt = encodeURIComponent(document.getElementById("cw_share_txt" .value);then pass it to a php page, on the php page, i collect the passed data: $text=nl2br(htmlentities(trim($_POST["txt"]))); Encoding of the php page above: header("Content-Type: text/xml; charset=utf-8" ;My problem is that the wall doesnt still support multi languages (displays as ? and causes my xml not to work)i still problems with some special characters (displays as � or ?) What am i not doing right? please assist |
| Re: Problem With Special Characters And Multilanguages by sayhi2ay(m): 5:31pm On Aug 19, 2010 |
try using the other charset, or remove it entirely, maybe you are doing it twice |
| Re: Problem With Special Characters And Multilanguages by ogzille(op): 6:23pm On Aug 19, 2010 |
@sayhi2ay, which other charset supports multi languages? |
| Re: Problem With Special Characters And Multilanguages by sayhi2ay(m): 7:58pm On Aug 19, 2010 |
try charset=iso-8859-1 |
| Re: Problem With Special Characters And Multilanguages by Nobody: 9:10pm On Aug 20, 2010 |
sayhi2ay:that was what i was going to say too. For most of my ajax-driven apps, i usually boot the page with header("Content-Type: text/xml; charset=iso-8859-1" ; |
Problem With Gigalayer: I Need Help • Problem With Registration At Wapka • Problem With Web4africa.net • 2 • 3 • 4
Jcomtech • The Power Of Bluevoda: How Real Is It? • Uploading Wordpress Blog
.value);
? and causes my xml not to work)