[whatwg] [WA1] Specifying Character Encoding

Lachlan Hunt lachlan.hunt at lachy.id.au
Fri Apr 8 23:29:49 PDT 2005

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

| 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://GetFirefox.com/     Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox

More information about the whatwg mailing list