My "em dash" character is shown differently on two servers.
When I visit Server 1: –
When I visit Server 2: â€"Â
I’m not using any database connection, just pure HTML.
Following are the first 4 lines of my HTML file:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta charset="utf-8" />
Please help me here, I can’t see what’s wrong with it.
-solution-
Like suggested below I replaced my dash with
–
To make the server display my ►-character correctly I had to place a .htaccess in the folder with the following line of code:
AddDefaultCharset UTF-8
Thanks everyone!
It’s possible they’re being served with different encodings. In UTF-8, you can just include the m-dash directly (—), but if the page is being served as ASCII, it needs to be encoded as
—. Take a look at the source and see which one it uses.I think this is what’s happening, because “—” is multiple bytes long, so it would be interpreted as multiple ASCII characters.