• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 677
  • Last Modified:

french characters using innerhtml and php

I have a php script, which displays records from the database. It has french characters also.
Now there is a textbox in front of each record, I can edit the order of each record and click on a save button. this calls an ajax function which replaces the whole div with the updated order of records.

Now the problem is that initially the records are displaying fine, but when the same thing is written after the ajax function is called using the innerhtml , then the french characters gets distorted and some squares are coming. also there is a radiobutton which opens a lightview window after replacing the div using innerhtml, the popup also does not come

hope i get an answer soon

thanks to all in advance !
<td><div align="center"><a href="add_news.php?nid=<?= $nrow->nid ;?>" class="lightview" title=":: :: autosize: true, width: 760, height: 630">
                <input type="radio" name="rdfid[]" id="rdfid[<?= $nrow->nid ;?>]"  />
              </a> </div></td>
              <? }?>
                  <?= htmlentities(stripslashes($nrow->title), ENT_QUOTES, 'UTF-8');?>

Open in new window

  • 2
  • 2
1 Solution

Use url_decode() function to display .

For more about that:

Desire2changeAuthor Commented:
i tried url_decode also but same output

Make sure you have the following in your html: <meta http-equiv="content-type" content="text/html; charset=utf-8">

And also you have


in your php.ini.

Please go through:


Also check your apache.conf   for  default-character-set .

Hope this will help you.

Desire2changeAuthor Commented:
when i click on link say 'News', it shows me the titles correctly with the , then when i change order an ajax function replaces the titles with the changed order at that time the titles don't show correctly
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now