• 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>
              <? }?>
              <td>
                  <?= htmlentities(stripslashes($nrow->title), ENT_QUOTES, 'UTF-8');?>
              </td>

Open in new window

0
Desire2change
Asked:
Desire2change
  • 2
  • 2
1 Solution
 
shobinsunCommented:
Hi,

Use url_decode() function to display .

For more about that:

http://in.php.net/urldecode
0
 
Desire2changeAuthor Commented:
i tried url_decode also but same output
0
 
shobinsunCommented:
Hi,

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

And also you have

default-character-set=utf8

in your php.ini.

Please go through:

http://blogs.sun.com/shankar/entry/how_to_handle_utf_8

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

Hope this will help you.

Regards
0
 
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
0
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