Forum Moderators: coopster

Message Too Old, No Replies

Question marks inside diamonds

Question marks inside diamonds

         

riddleyw

5:41 pm on Jul 5, 2009 (gmt 0)

10+ Year Member



My mysql database has a field that shows perfectly when viewed in myphpadmin. However, when I display it via my php web page certain characters (mostly apostrophes) display as black diamonds with question marks. The database is in utf8_general_ci.

The fact that it displays properly in PHPmyadmin suggests it is something in my web page or that they have a good trick for avoiding this problem.

Does anyone know what I can do?

whoisgregg

6:09 pm on Jul 5, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, riddleyw!

Check that your HTML is setting the content-type to UTF-8:

<meta http-equiv="content-type" content="text/html; charset=utf-8" />

bkeep

7:28 pm on Jul 5, 2009 (gmt 0)

10+ Year Member



Also when displaying the data to the page use htmlentities() if you are using PHP