[riscosweb] Re: Browsers not responding to charset=ISO-8859-2

  • From: Matthew Somerville <riscos@xxxxxxxxxxxx>
  • To: riscosweb@xxxxxxxxxxxxx
  • Date: Tue, 14 Nov 2006 00:21:31 +0000

Russell Hafter - Lists wrote:
Nevertheless, the W3C validator does require (or did last time I
validated some pages) a line such as <meta http-equiv="Content-Type"
content="text/html; charset=ISO-8859-2"> .

Only if the server doesn't send an encoding (as your second example does not); then, the validator doesn't know what to use. But if you specify an encoding on the server, there's no need for the document to contain anything. For example, http://www.dracos.co.uk/temp/tc doesn't have any meta element (or much at all), but validates fine:
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.dracos.co.uk%2Ftemp%2Ftc

Orpheus internet tells me that the server is upposed to work in exactly
the way I suggested - the  ISO-8859-1 header is meant to be a default,
but allowing itself to be overriden by my charset=ISO-8859-2 declaration.

No, that is quite definitely wrong. As you can read at http://www.w3.org/TR/html401/charset.html#h-5.2.2 :

--8<--------------------
To sum up, conforming user agents must observe the following priorities when determining a document's character encoding (from highest priority to lowest):
* An HTTP "charset" parameter in a "Content-Type" field.
* A META declaration with "http-equiv" set to "Content-Type" and a value set for "charset".
* The charset attribute set on an element that designates an external resource.
--8<--------------------

--
ATB,
Matthew


Other related posts: