W3C home > Mailing lists > Public > www-html@w3.org > July 2002

charset & language priorities

From: Kristi Schultz <kristis@us.ibm.com>
Date: Thu, 25 Jul 2002 12:53:42 -0500
To: www-html@w3.org
Message-ID: <OFAC902590.74201936-ON86256C01.00623C6C@rchland.ibm.com>

In the HTML spec/recommendations, a different priority order is given for
language encodings than character sets for user agent
interpretation....  I'd like to understand why - in particular, I'd like to
understand the reasoning behind the priority for charset since
it is (I think) counter-intuitive...  Especially given the priority for
language encoding.

Here's the two excerpts that I am referring to:

Spec:  Section 8.1.2 Inheritance of language codes
An element inherits language code information according to the following
order of precedence (highest to lowest):
- the lang attribute set for the element itself
- the closest parent element that has the lang attribute set
- the HTTP "Content-Language" header

Rec:  Section 5.2.2 Specifying Character Encoding
To sum up, 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.

It seems to me that the document writer has more knowledge on the actual
content than the server does, so is more likely to be
accurate - hence should be given higher priority....




Kristi Schultz - Internet:  kristis@us.ibm.com
System Chief Engineering Manager - IBM iSeries Software
(507)253-2177  t/l 553-2177 Fax: (507)253-0335
------------------------------------
"Now faith is the assurance of things hoped for, the conviction of things
not seen"
  Hebrews 11:1
Received on Thursday, 25 July 2002 13:57:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:52 GMT