I'm a noob at this character encoding stuff, so go easy.

I'm saving my HTML file as UTF-8. I'm declaring UTF-8 at the beginning of my HTML file thusly:

<!DOCTYPE html>
<html lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

Yet down in the body, I have a copyright symbol that displays fine in Firefox and IE, but in Webkit looks like this:


When I manually change the encoding in Chrome or Safari, it displays correctly; but by default it shows the above.

I know that some sites ampersand-encode all their special characters, but it doesn't seem like it should be necessary.

What's going on?

3 answers


Your meta tag looks correct, you shouldn't need UTF to be lower case. Have you checked to see what the browser thinks the encoding of the page is? In Firefox, select View | Character Encoding and Tools | Page Info to see if Firefox thinks your page is UTF-8 encoded. If you check this and discover that your page is not been detected as UTF-8 decoded, it could be that the http headers sent from your web server are setting the encoding and that is overriding the encoding in the meta tag. This page gives a good tutorial on how this works - http://www.w3.org/International/tutorials/tutorial-char-enc/.

Answered about 9 years ago by Charlotte Moller
  • Right now I'm loading the file from a local filesystem (Windows XP). Surely it doesn't specify that header on local requests? Lanny Heidbreder about 9 years ago
Ste4lth 28

Are you using the actual character or the HTML &copy tag? Some browsers don't support certain direct characters. Try the HTML &copy tag.

Answered about 9 years ago by Ste4lth

I'm pretty sure UTF must be lower case.

Answered about 9 years ago by Sean Maher