Interpret explicit BE and LE labels without switching
05An 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.
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 ↗
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.
Terms in this drawing
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
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.
§§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 ↗