By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,949 Members | 2,043 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,949 IT Pros & Developers. It's quick & easy.

French accent problem when using ajax

P: n/a
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

Mar 20 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On 20 Mar, 11:27, "bss" <masho...@gmail.comwrote:
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.

Mar 20 '07 #2

P: n/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.
--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Mar 20 '07 #3

P: n/a
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

On Mar 20, 8:26 pm, ASM <stephanemoriaux.NoAd...@wanadoo.fr.invalid>
wrote:
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/a...>

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

--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date

Mar 22 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.