Forum Moderators: open
The character encoding specified in the HTTP header (iso-8859-1) is different from the value in the <meta> element (utf-8). I will use the value from the HTTP header (iso-8859-1) for this validation.
these are the first lines of my page:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>MY TITLE</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Where does the "value from the HTTP header (iso-8859-1)" come from?
Ah, I am writing in Italian and i nedd the accented wovels like "è" and "à". What character encoding should I use?
Either character set can represent Western European characters, but the server header and the on-page meta tag should be in agreement for best results. When they are not in agreement, the http header from the server takes precendence.
Whichever charset you use, make sure that your authoring software is saving your document with the right encoding. My guess in your situation is that you are not actually saving your content in UTF-8, and that browsers are listening to the server headers at any rate. So just changing your charset meta tag is all you need to do.
Here are some pages from the W3C that get into more detail:
Server setupHow to make the server send out appropriate 'charset' information depends on the server. You will need the appropriate administrative rights to be able to change server settings...[instructions for various servers follows]
[w3.org...]
...conforming user agents must observe the following priorities when determining a document's character encoding (from highest priority to lowest):1. An HTTP "charset" parameter in a "Content-Type" field.
2. A META declaration with "http-equiv" set to "Content-Type" and a value set for "charset".
3. The charset attribute set on an element that designates an external resource.[w3.org...]