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.

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

Some links that you might find useful [External]:

Related posts:

  1. Super Tip: Pass Arguments in your Python Bindings using Lambda Functions
  2. How to: Fix OCUpload/One-Click Upload clicking bug in IE7 & IE8 (jquery)

Still can't see what you're looking for?



Leave a Reply

Anti-Spam Protection by WP-SpamFree