How to: Remove those nasty question marks with a diamond symbols that appears in your website


Problem: Help! I’ve pasted some text from Microsoft Word and saved it to my SQL database! Now whenever I print my text there’s a bunch of diamonds with a question mark symbols appearing!

Solution: You are trying to display characters that are outside your page’s character set, you have to tell your browser that you need to display characters from the iso-8859-1 set so it will know how to render them correctly.

Simply put the following inside your website’s <head></head>

<META http-equiv="Content-type" content="text/html; charset=iso-8859-1">

and in PHP(or any other similar language), simply put this at the top of your page(for other languages, look for an identical function):

<? header("Content-type: text/html; charset=iso-8859-1"); ?>

and voila! Your characters should now be displayed correctly.

3 Comments on “How to: Remove those nasty question marks with a diamond symbols that appears in your website”

  1. 1 Tim said at 2:40 AM on January 26th, 2010:

    Thanks for that tip, I pasted the PHP line int the header of my WordPress blog theme, and the question marks are gone, they’ve been there for months, thanks again.

  2. 2 Lee-ann said at 4:33 PM on August 27th, 2010:

    Hi there

    I have tried this and it fixes one of the problems, however it still shows on my links.

    Any idea why

  3. 3 Lee-ann said at 4:55 PM on August 27th, 2010:


    I have found another source of these question marks. All you characters like &, copyright and reg etc must be hard coded in the html, or it will sho up, as well as there must be onle one space, not two spaces after a full stop. IE the coding must be done corectly.

Leave a Reply