W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2005

[whatwg] [WA1] Specifying Character Encoding

From: Anne van Kesteren <fora@annevankesteren.nl>
Date: Sat, 09 Apr 2005 08:55:45 +0200
Message-ID: <42577C71.7050807@annevankesteren.nl>
Lachlan Hunt wrote:
> | 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.

Why? If people are still using text/xml for example you really want them 
to use the HTTP Content-Type header. Otherwise its US-ASCII.


> 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.

Where did you read that in the XML specification? You can always specify 
encoding using the 'charset' parameter. That it is not recommended 
because "webarch" things documents should be self-describing doesn't 
matter. Also note that when the document is served using text/xml they 
could use UTF-8 but it wouldn't work.


-- 
  Anne van Kesteren
  <http://annevankesteren.nl/>
Received on Friday, 8 April 2005 23:55:45 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:22 UTC