[whatwg] [WA1] Specifying Character Encoding

In the current draft, for specifying the character encoding [1], it is 
stated:

| In XHTML, the XML declaration should be used for inline character
| encoding information.
|
| Authors should avoid including inline character encoding information.
| Character encoding information should instead be included at the
| transport level (e.g. using the HTTP Content-Type header).

The second paragraph should only apply to HTML using the meta element, 
not XHTML using the XML declaration.

For X(HT)ML, according to the Architecture of the World Wide Web, Volume 
One - Media types for XML [2]:

| In general, a representation provider SHOULD NOT specify the character
| encoding for XML data in protocol headers since the data is
| self-describing.

I think it should also be noted that authors who omit the XML 
declaration (or include it but don't specify the encoding attribute) 
*must* use UTF-8 or UTF-16, as described in the XML recommendation.

[1] http://www.whatwg.org/specs/web-apps/current-work/#charset
[2] http://www.w3.org/TR/2004/REC-webarch-20041215/#xml-media-types

-- 
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/     Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox

Received on Friday, 8 April 2005 23:29:49 UTC