Reputation: 49
I am using fusion charts, and getting xml of fusion charts through ajax. On server side I am using php to make xml. I am using htmlentities function like this
$name = htmlentities($name, ENT_QUOTES , 'UTF-8');
to encode special characters and getting this kind of xml
<dataset seriesName='le français'>
for le français.
But is does not show in fusion chart. Plz tell me the correct way to do it.
Upvotes: 0
Views: 759
Reputation: 783
I just made a PHP file with the lines below and save it as an ANSI encoded file:
$name = 'le français';
$name = htmlentities($name, ENT_QUOTES);
echo $name;
This just gave me the result you were expecting:
le français
Seems the special charcter just gets ignored when using UTF-8 as encoding:
htmlentities($name, ENT_QUOTES, 'UTF-8');
Upvotes: 1