Content deleted Content added
→Character encoding determination: Added subheadings. Added info on UTF-8 BOM. Added more info on XHTML. More data on encoding overriding. Deleted info on 'text/*' (read: text/xml) was incorrect: Even application/xhtm+xml can override enc. info |
m Typo patrol, typos fixed: agianst → against, documetns → documents, the the → the using AWB (7794) |
||
Line 40:
===Encoding information===
When a document is transmitted via a [[MIME]] message or a transport that uses MIME content types such as an [[HTTP]] response, the message may signal the encoding via a Content-Type header, such as <code>Content-Type: text/html; charset=UTF-8</code>. Other external means of declaring encoding are permitted but rarely used. If the document uses an [[Comparison_of_Unicode_encodings|Unicode encoding]], the encoding info might also be present in the form of a [[Byte order mark]]. Finally, the encoding can be declared via the HTML syntax. For the <code>text/html</code> serialisation then, as long as
===Encoding defaults===
Line 56:
For HTML documents which are <code>text/html</code> serialized, manual override may apply to all documents, or only those for which the encoding cannot be ascertained by looking at declarations and/or byte patterns. The fact that the manual override is present and widely used hinders the adoption of accurate encoding declarations on the Web; therefore the problem is likely to persist. But note that Internet Explorer, Chrome and Safari — for both XML and <code>text/html</code> serializations — do not permit the encoding to be overridden whenever the page includes the BOM.<ref>[http://www.w3.org/Bugs/Public/show_bug.cgi?id=12897 Bug 12897 - In some parsers, UTF-8 BOM trumps the HTTP charset attribute (Encoding sniffing algorithm)]</ref>
For HTML documents serialized with the preferred XML label — <code>application/xhtml+xml</code>, manual encoding override is not permitted. To override the encoding of such an XML document would mean that that the document stopped being XML, as it is a fatal error for XML
==Web browser support==
|