encoding attribute in XML declaration

Hepp!

I suppose I'm not the first remarking this thing, but I haven't seen 
any discussion on the subject here.

In the XHTML 1.O PR, under 3.1.1 [1] the specs says:

<quote>
Here is an example of a minimal XHTML document.
<?xml version="1.0" encoding="UTF-8"?>
<... snip rest of code ...>

Note that in this example, the XML declaration is included. An XML 
declaration like the one above is not required in all XML documents. 
XHTML document authors are strongly encouraged to use XML 
declarations in all their documents. Such a declaration is required 
when the character encoding of the document is other than the default 
UTF-8 or UTF-16.
</quote>

Is it really appropriate to tell the encoding in the document? There 
is no chance for me to control the encoding during the entire 
lifetime of a document. If, for example, someone saves the file on 
her/his computer the encoding probably will be some Mac  or Windows 
encoding, and the encoding declaration in the file becomes  just 
plain wrong. Isn't this a http issue that XHTML should stay out of?

Or is every UA or system supposed to change the text when the 
encoding is changed? :)

If this debate already has bored you all to death, please point me to 
the results of it.

[1] http://www.w3.org/TR/xhtml1/#strict
-- 
Christian Ottosson
http://www.f.kth.se/~f95-cot/

Received on Thursday, 20 January 2000 05:31:00 UTC