homepage Welcome to WebmasterWorld Guest from 54.161.197.188
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
problem with french accented characters
Accented characters replaced by question marks
dbarasuk




msg:4322954
 2:50 pm on Jun 7, 2011 (gmt 0)

Hi,
I am getting data from a mysql database which has latin1 as charset and latin1_general_ci as collation. I use htmlentities() function to change the french accented characters into normal ones but the browser is replacing all the accented characters like "à", "é", "è" with question marks. Has someone encountered this problem before?
How can I solve it?

Thank you in advance.

 

rocknbil




msg:4323004
 4:02 pm on Jun 7, 2011 (gmt 0)

Discussion in progress [webmasterworld.com]. - it's the same issue, really.

dbarasuk




msg:4323049
 5:33 pm on Jun 7, 2011 (gmt 0)

Yes, it seems that the discussion you suggest teaches replacing ISO-8859-1 (latin1) with UTF-8. When i do the accented characters are replaced by black diamonds and my problem is not solved out.

lucy24




msg:4323062
 6:04 pm on Jun 7, 2011 (gmt 0)

It's not solved, but you've got more information. Latin-1 question marks vs. Unicode diamonds.

I use htmlentities() function

Is this done when the characters enter the database or when they leave it? What is the file encoding of the page itself? As noted in the other thread, changing the meta tag by itself doesn't change the underlying text, it just changes how the browser interprets it.

At some point between the database and the final page display, your non-ASCII characters are being, er, de-entitized. Have you looked at the page code? Not the preliminary php/whatever, but the source code of the actual page as displayed in a browser. If you're not seeing entities, something has gone wrong.

dbarasuk




msg:4323491
 3:32 pm on Jun 8, 2011 (gmt 0)

i tried to see the page code and indeed the page code does not contain entities, the problème occurs when the data leaves the database from a linux (old red hat system) host. There's no problem with the same PHP program and database on my local windows machine. Actually, even on the linux machine there was not problem until yesterday. Probably someone changed something. The htmlenties() function does not solve the problem.

Greetings!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved