Summary
- RFC 2376 (July 1998) registered
text/xmlandapplication/xml— and gave a missingcharsettwo opposite meanings. Undertext/xml, silence meant US-ASCII, even when the bytes opened with a UTF-16 byte-order mark and the document declaredencoding="utf-16". - The episode split five things people still confuse: the registry label, the received header, the body bytes, the decoder's precedence rule and the application's meaning. RFC 7303 closed the gap in 2014.
A document that could describe itself — and an envelope that could overrule it
The document knew exactly what it was. It said so in its opening bytes: a byte-order mark, then a declaration spelling out encoding="utf-16". It travelled inside an HTTP envelope that said nothing at all about encoding. And when the receiver opened it, the official answer was US-ASCII.
That is not a bug report. That is a specification — RFC 2376, published in July 1998 — and it remains one of the cleanest small case studies in Internet history of where authority actually lives. Not in the thing being described. In the layer that gets to describe it.
July 1998: two names for a brand-new format
XML was designed to carry structure across systems that shared no software, no hardware and no local character conventions. Its declaration could name an encoding inside the entity; its byte-order mark could distinguish the important forms before anyone read a single tag. For 1998, that was startlingly good self-description.
But a document crossing the Internet never travels alone. HTTP, email and WebDAV carried it inside a MIME-style envelope, and that envelope had a Content-Type — which could carry a charset. So the XML processor did not receive one answer to "what do these bytes mean?" It received several, and no referee.
E. Whitehead and M. Murata wrote RFC 2376 to supply the names: text/xml and application/xml. It was an Informational document, not an Internet Standard, and its immediate job was modest and necessary — stop XML being mislabelled as SGML, and give independent implementations a common label for exchanging XML entities.
A presentation choice became an authority choice
The two registrations were meant to guide default handling. Every XML entity could use application/xml; an agent with no XML support could simply offer it as an opaque file. text/xml signalled that the entity could be treated as plain text — convenient for display, inspection and the whole human-readable tradition of the text top-level type.
That convenience imported MIME's rules along with its respectability. In RFC 2376, an explicit charset parameter was authoritative for both media types: a receiver decoded according to the envelope even when the document carried an internal declaration saying something else.
The sharper difference appeared when the parameter was absent. For application/xml, absence meant only that the envelope had supplied no encoding information — so an XML-aware processor could fall back on the BOM, the initial byte pattern and the XML declaration, while an XML-unaware MIME processor was told not to guess.
For text/xml, absence meant US-ASCII. The rule held over HTTP. It held when the bytes were UTF-8. It held when the bytes were UTF-16. It held when the entity visibly, unambiguously declared its own encoding in its first line. The external omission did not leave authority vacant; it activated an inherited default. Silence, it turned out, was a decision.
The example was deliberately impossible
RFC 2376 did not bury the conflict in a footnote. Its omitted-charset example placed a UTF-16 byte-order mark and encoding="utf-16" inside an entity labelled only text/xml — and stated the result plainly: US-ASCII. A conforming processor could not rescue the document by believing what the document said about itself.
The same bytes under application/xml took a different road. With no charset parameter, the BOM could identify UTF-16; without a BOM, the processor could examine the initial pattern and the internal declaration. One word at the top of the media type decided which evidence counted.
This was never a parser curiosity. A gateway might strip a MIME header before storing the body. A transcoder might change the bytes and the external charset without touching the internal declaration. A file copied out of its delivery context could lose the label that had governed it — and the persistent object was not always self-sufficient.
Self-description still needed a constitution
XML 1.0 saw the problem coming. Its in-band declaration made encoding detection practical, but an internal label cannot by itself settle a conflict with external metadata; the XML specification deferred priority to the higher-level delivery protocol.
The division was sensible. A transport agent can transform bytes in ways the document cannot observe. It also created a governance question that outlives XML: which layer may overrule which other layer, and what happens when a value is missing rather than contradictory?
RFC 2376 answered with a rule inherited partly from MIME history. RFC 3023, from Murata, St. Laurent and Kohn, replaced it in January 2001 and kept the text/xml US-ASCII default, arguing that an explicit MIME charset had real operational value when intermediaries transcoded text. Deployed practice, and the standards around textual media generally, kept moving anyway.
The repair removed a silent decision
RFC 6657 (2012) required new textual media types to define their charset behaviour rather than inherit a general US-ASCII assumption. Then RFC 7303 — Thompson and Lilley, July 2014 — replaced RFC 3023 and aligned text/xml with application/xml. The old distinction stopped deciding encoding merely because the sender had picked the text branch.
RFC 7303 described up to three sources of encoding evidence: BOM, MIME charset and XML declaration. Its precedence put a BOM first and, absent a BOM, an explicit charset next; if neither existed, XML's own rules applied. It still recommended application/xml, partly to escape the confusion the earlier split had left behind.
The successor also strengthened the +xml convention. A type such as an application-specific something+xml advertises that generic XML tools may inspect the syntax while preserving a more precise account of the document's purpose — a useful reminder that being parseable as XML says nothing about what the vocabulary means or which actions are safe.
A media type is not an execution receipt
The IANA registry today records application/xml and its relatives against RFC 7303. That is a durable coordination fact — and nothing more. It does not prove that a particular response carried the intended header, that a proxy preserved it, that the body matched it, that the parser chose the expected encoding, or that application code understood the vocabulary.
Lu Heng's reality-layers lens makes the historical mistake easy to avoid. The registered media type, the received header, the octets, the BOM, the XML declaration, the decoder's output, the parsed tree and the business action all live on different layers. They may agree. Agreement must be observed, never assumed.
Running-code primacy points to the decisive evidence: capture the actual header and body bytes, record the processor and its rule set, preserve the resolved character stream. Minimum initial specification explains why the original registration was still worth having — it opened a narrow common path for XML exchange. The later repair did not reject coordination. It removed an authority decision that had been hiding inside a default.
The envelope always wins the argument it is permitted to enter. The only question worth asking is whether someone wrote the rule down — or left it sitting in the silence.
Member Briefing
Read the full trend briefing
Members read the full briefing with the source notes behind every finding.
Strategic Circle
A daily briefing in your language, built from changes we have verified.
Join for USD 20/monthCancel anytime.
Members also get the full research library, a daily briefing on the networks they follow and the private forum.






