Reputation: 4459
I have a bit of an odd problem here that I cannot figure out. I have two pages: index.html
and index2.html
. The utf-8
character encoding works fine in index.html
but it does not work in index2.html
. For example the following paragraph:
Ex-Fleet Foxes drummer Josh Tillman struck out on his own (he was already a singer/songwriter in his own right prior to joining Foxes) and rechristened himself professionally as “Father John Misty.”
The quotes around Father John Misty display perfectly in index.html
but appear as diamonds with a question mark on index2.html
. Both pages have this meta tag:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
I can even copy and paste the exact same source code from index.html
into index2.html
and it still does not work. Is there something I need to place into a .htaccess file? I already checked the permissions on both .html files are they are identical. I'm at a loss as to what else the problem might be.
Upvotes: 1
Views: 3892
Reputation: 522597
If the result shows the Unicode replacement character �, that means whatever is reading the document is trying to interpret it as Unicode (usually UTF-8), but encountered a byte sequence which is not valid in that encoding.
In other words: the browser is trying to do the right thing, the document is not actually UTF-8 encoded. Check the settings in your editor.
Upvotes: 6