Ortund Ortund - 1 year ago 194
HTML Question

Why do symbols like apostrophes and hyphens get replaced with black diamonds on my website?

A website I've made has a few problems... On one of the pages, wherever there's an apostrophe (

) or a dash (
), the symbol gets replaced with a weird black diamond with a question mark in the center of it

Here's what I mean


It seems this is happening all over the site wherever these symbols appear. I've never seen this before, can anyone explain it to me?

Suggestions on how to fix it would also be greatly appreciated.

See http://test.rfinvestments.co.za/index.php?c=team for a clear look at the problem.

Answer Source

It's an encoding problem. You have to set the correct encoding in the HTML head via meta tag:

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

Replace "ISO-8859-1" with whatever your encoding is (e.g. 'UTF-8'). You must find out what encoding your HTML files are. If you're on an Unix system, just type file file.html and it should show you the encoding. If this is not possible, you should be able to find out somewhere what encoding your editor produces.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download