Visual RFC.
ALL RFCs / RFC 3629
Read the RFC ↗
RFC 3629 / MECHANISM GUIDE

Is this invisible front item a note or real text?

04

An optional front signature can hint at the encoding. The same item inside the text is actual text.

RFC 3629 · § 6EXAMPLE
1 / 4 · Look at the positions, even when an item is invisible

The labeled tiles show things a normal display may hide.

Stored text items

Item 1Invisible item
Item 2A
Item 3B

What happens if you change this?

Make one change, then watch again. Restart restores the original example.

3 / 3
03
Decode remaining content

Do not interpret a signature as a byte-order switch.

Is this invisible front item a note or real text?An optional front signature can hint at the encoding. The same item inside the text is actual text.Is this invisible front item a note or real text?EFBBBFInitial U+FEFF signatureAllowed by profile?Forbidden by profile?UTF-8 has no little-endian / big-endian switch

Key idea: Position and the containing format decide meaning. Do not erase invisible text just because it looks like nothing.

Terms
UTF-8
A rule for turning Unicode character numbers into ordered bytes, and back.
Code point
A character number in Unicode. A scalar value excludes reserved surrogate numbers.
Byte / bit
A byte is eight bits. A bit has one of two values: zero or one.
Leading / continuation byte
The first piece tells the reader how many bytes belong together. Following pieces start with the bits 10.
Normalization
A specified way to transform Unicode text before comparison. It does not turn every lookalike into the same letter.
BOM
A contextual initial encoding signature. UTF-8 never uses it to switch byte order.

Look up a term in the glossary ↗

Rules & examples
  • The BOM is not required to determine endianness in UTF-8.
  • Protocols should specify whether an initial signature is allowed.
  • Blindly stripping meaningful data can affect signatures or character interpretation.

Examples are illustrative. Consult the linked RFC and its errata for implementation details.

RFC 3629 §6. U+FEFF encodes as EF BB BF. Initial signature interpretation is contextual; non-initial U+FEFF MUST NOT be interpreted as a signature. Avoid stripping an initial signature without a good reason because counts/signatures may depend on it. Here the first-only operation removes it only when interpreted as a signature. Source EF BB BF 41 42; resulting bytes EF BB BF 41 42.

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

First, agree how to read the message.

An encoding tells a reader how to interpret bytes. A format tells it how values fit together. Correctly reading a value does not make that value trustworthy.

Start with this guide; no earlier guide is needed for the overview.

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.

All chapters in RFC 3629

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 ↗