Jump to content

character set in meta tag


damiancds
 Share

Recommended Posts

So, i went through a validator, and all my pages validated except that they come up with an error, (No Character encoding declared at document level)I went to add a meta tag to the document with the character (<META http-equiv="Content-Type" content="text/html; charset=US-ASCII">)I put us-ascii because when I edit the page in cpanel, that's what shows up for encoding. But, when I validated it, the page said the encoding was utf-8the validation results are hereI really just want to know how to check the real character encoding so I can put the right one in.

Link to comment
Share on other sites

Your server is already outputting a charset header, so you do not technically need this meta tag. It is not wrong to keep it, and having one makes the document portable, in case your server changes.Don't use US-ASCII, though. It's too limited. Use UTF-8, as in:<meta http-equiv="content-type" content="text/html;charset=UTF-8">You'll be much friendlier to the outside world. My experience is that when a host is configured to output a charset, UTF-8 is the default. It's pretty universal. It includes accents and umlauts and things like that, and even characters from other systems. US-ASCII forms the first 128 characters of UTF-8 and then you get many more characters.Anyone know: Does US-ASCII even use the 8th bit? Is it just set to null?

Edited by Deirdre's Dad
Link to comment
Share on other sites

Well, if you print out the bell character in the Windows command line, it really does go "beep"! :)But yes, Unicode is much better for the sort of text we handle nowadays.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...