PHP encoding problem [UTF-8] : Urgent ,Please help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sanjeevk
Forum Newbie
Posts: 3
Joined: Sun Mar 18, 2007 10:43 pm

PHP encoding problem [UTF-8] : Urgent ,Please help

Post by sanjeevk »

Hi everyone

I had a site running in two llanguages. For this to support multi language i had made my mysql database in UTF-8 format . Similarly i have inclluded <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">.
Now i have problems with the meta tags and static javascript.
example for
<meta name="description" content="L'annuaire des forums francophones sur le Php et création de forums à la demande">
i have used
<meta name="description" content="L'annuaire des forums francophones sur le Php et cr&eacute;ation de forums &agrave; la demande">
[Please note création is written as cr&eacute;ation]
to support the UTF-8. But the problem is it is not working well . In the site when i see the view source the contents i get is
<meta name="description" content="L'annuaire des forums francophones sur le Php et cr&eacute;ation de forums &agrave; la demande">
But the case is i need it to be displayed as
<meta name="description" content="L'annuaire des forums francophones sur le Php et création de forums à la demande">
Please anyone can help me solve this problem . My site is Live and i have problem . Please help.
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

&eacute; is an entity. Is it stored this way?

html_entity_decode() maybe?
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
sanjeevk
Forum Newbie
Posts: 3
Joined: Sun Mar 18, 2007 10:43 pm

Post by sanjeevk »

scottayy wrote:&eacute; is an entity. Is it stored this way?

html_entity_decode() maybe?
to display french character é i used &eacute;.
similar is the case for other french character.
Now in my page when i see the source by view source, i get &eacute; in place of é in meta keywords and description. But i need it to be displayed as é.
Post Reply