French accent problem when using ajax

B

bss

Dear All,

I have developing a French website using PHP & Ajax. In that I tried
to display some French texts from mysql database using Ajax. Form
local I got the text from db with
Correct accents but in online French accents are missing. The text
displays like this "de r?isation pour regroup?a majorit?es ". I
declared following code in the head section of the file.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<script src="include/showartical.js" type="text/javascript"
language="javascript" > </script>
</head>
When i display the text with out using Ajax I get the French text
perfectly.

Please help me how to display French text without missing any accents
using PHP & Ajax.

With Regards
Ashok
 
S

shimmyshack

Dear All,

I have developing a French website using PHP & Ajax. In that I tried
to display some French texts from mysql database using Ajax. Form
local I got the text from db with
Correct accents but in online French accents are missing. The text
displays like this "de r?isation pour regroup?a majorit?es ". I
declared following code in the head section of the file.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<script src="include/showartical.js" type="text/javascript"
language="javascript" > </script>
</head>
When i display the text with out using Ajax I get the French text
perfectly.

Please help me how to display French text without missing any accents
using PHP & Ajax.

With Regards
Ashok

make sure your encoding is consistent, set it all to utf-8 OR
iso-8859-1, but dont mix them, my choice is utf-8 because it will
allow you to use many other languages too.
 
A

ASM

bss a écrit :
Dear All,

I have developing a French website using PHP & Ajax. In that I tried
to display some French texts from mysql database using Ajax. Form
local I got the text from db with
Correct accents but in online French accents are missing.

You should have a charset in utf-8
then have to correct some disfunctions in PHP

voir le fil :
<http://groups.google.com/group/fr.comp.infosystemes.www.auteurs/msg/a16b01658f55c88d?rnum=1>

sinon : le pb d'encodage sur PHP =
mysql_query ("SET NAMES 'utf8'"); force le jeu utf8.
 
B

bss

finaly i got the result
i missed the "header("Content-Type: text/html; charset=iso-8859-1");"
in php code part.
Thanks for your valuable info and Time

With Regards
ashok
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top