₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,329,308 members, 8,439,864 topics. Date: Monday, 06 July 2026 at 07:07 AM

Toggle theme

Problem With Special Characters And Multilanguages - Webmasters - Nairaland

Nairaland ForumScience/TechnologyWebmastersProblem With Special Characters And Multilanguages (725 Views)

1 Reply (Go Down)

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"wink.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"wink;
My problem is that

the wall doesnt still support multi languages (displays as huh? 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:
try

charset=iso-8859-1
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"wink;
1 Reply

Problem With Gigalayer: I Need HelpProblem With Registration At WapkaProblem With Web4africa.net234

JcomtechThe Power Of Bluevoda: How Real Is It?Uploading Wordpress Blog