For some reason, the plain text character – on the html side is being dsiplayed as –. The only thing I can think that would be attributed to this is the character encoding. My guess is that it’s utf-8, but not sure how I am getting the weird characters. Is there an explanation?
What I mean by default is if the charset isn’t specified.
The
!DOCTYPEdoesn’t set a character encoding, themetaelement together with the (newly standardized)charsetattribute does. If it’s absent I’m not entirely sure how the browser determines the encoding.I believe the problem you’re having though is that your page is saved in one encoding and served in another.
Just make sure you set
<meta charset="utf8"/>and make sure your document is in fact utf8 and it should work.