Visual RFC.
ALL RFCs / RFC 2781
Read the RFC ↗
RFC 2781 / UTF-16 REPRESENTATION

Interpret explicit BE and LE labels without switching

05

An explicit UTF-16BE or UTF-16LE label fixes byte order. A conflicting initial marker is an error, rather than permission to silently swap the declared order.

RFC 2781 · § 4.1EXAMPLE
4 / 4
Interpret explicit BE and LE labels without switchingLElabelwithFEFFprefix errors rather than autoswitchingtoBE.Explicit label fixes order; no silent order switchLabel: UTF-16LEFEFFconflicting prefix: errorDeclared LE would produce FFFEDo not switch to the opposite orderReceiver rules §§4.1–4.2; sender BOM prohibition is a separate rule
04
Report a conflicting little-endian prefix

Separate invalid LE-labelled example starts FE FF. Under the declared order this yields FFFE, which §4.2 treats as an error; do not switch to big-endian.

Source for this drawing: RFC 2781 · Read RFC source: § 4.1 ↗

Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background

A message needs an address.

Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.

Helpful first, if these ideas are unfamiliar

These pictures are analogies to help you learn. The linked RFC explains the actual rules.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

KEY POINT

UTF-16BE is interpreted big-endian; UTF-16LE is interpreted little-endian (also §4.2).

  • UTF-16BE is interpreted big-endian; UTF-16LE is interpreted little-endian (also §4.2).
  • For UTF-16BE, initial FF FE is an error under §4.1. For UTF-16LE, initial FE FF is an error under §4.2.
  • A matching initial FEFF does not change the declared order. Do not confuse receiver interpretation with the sender’s MUST NOT prepend a BOM rule.
DETAILS

§§4.1–4.2 govern these selected prefix checks; the helper is not a full repertoire or noncharacter policy. Structural code-unit arithmetic does not establish that a numeric value is an assigned Unicode character.

Read the RFC section ↗

All chapters in RFC 2781

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗