Do two similar-looking words contain the same text?
05A letter and an added accent can look like one pre-made accented letter. Similar appearance alone does not settle comparison.
The font may make them look alike. We still need to inspect the stored items.
What happens if you change this?
Make one change, then watch again. Restart restores the original example.
Visual similarity alone does not establish equal identifiers or trusted names.
Key idea: Decode correctly first, then apply the comparison rule your application actually specifies. A visual match is not proof of identity.
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.
Rules & examples
Decode correctly first, then apply the comparison rule your application actually specifies. A visual match is not proof of identity.
- Different Unicode sequences can appear equivalent to a person.
- Normalization and comparison rules belong to the consuming protocol.
- Decoding must reject invalid input before security-sensitive comparisons.
Examples are illustrative. Consult the linked RFC and its errata for implementation details.
RFC 3629 §10 discusses canonically equivalent spellings and Unicode normalization. This bounded example chooses exact sequence comparison or NFC; NFC is not a universal identifier, authorization or lookalike policy. Original UTF-8 bytes: C3 A9 versus 65 CC 81.
Sources
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.