Via dit artikel (zie evt. ook de comments) kwam ik bij het W3C terecht. Ik zal het voor het gemak wel even quoten:
Second, representations whose Internet media types begin with "text/" are required, unless the charset parameter is specified, to be considered to be encoded in US-ASCII. Since the syntax of XML is designed to make documents self-describing, it is good practice to omit the charset parameter, and since XML is very often not encoded in US-ASCII, the use of "text/" Internet media types effectively precludes this good practice.
Good practice: XML and character encodings. In general, a representation provider SHOULD NOT specify the character encoding for XML data in protocol headers since the data is self-describing.
Het gaat mij er om wat nou "best practice" is. Je zet in een XHTML en XML document een XML declaratie, eventueel met een encoding declaratie. Ik ging er vanuit dat de vermelding van een encoding declaratie sowieso de bedoeling is (ook al is deze middels een HTTP header al bekend). En ik dacht dat het http-equiv-statement niet wordt herkend door XML applicaties. Kan iemand mij een beetje helder uitleggen hoe het zit?Historically, the character encoding of an HTML document is either specified by a web server via the charset parameter of the HTTP Content-Type header, or via a meta element in the document itself. In an XML document, the character encoding of the document is specified on the XML declaration (e.g., <?xml version="1.0" encoding="EUC-JP"?>). In order to portably present documents with specific character encodings, the best approach is to ensure that the web server provides the correct headers. If this is not possible, a document that wants to set its character encoding explicitly must include both the XML declaration an encoding declaration and a meta http-equiv statement (e.g., <meta http-equiv="Content-type" content="text/html; charset=EUC-JP" />). In XHTML-conforming user agents, the value of the encoding declaration of the XML declaration takes precedence.
Note: be aware that if a document must include the character encoding declaration in a meta http-equiv statement, that document may always be interpreted by HTTP servers and/or user agents as being of the internet media type defined in that statement. If a document is to be served as multiple media types, the HTTP server must be used to set the encoding of the document.