100% Client-Side Computation • Zero Server Logs • Instant Execution
Curious TechieDev Toolbox
Encodings & FormatsThe Unicode Consortium / Unicode Standard 15.0 / RFC 3629✓ Fast Lookup Table (6 Entries)

Unicode & UTF-8 Reference

Code points, planes, UTF-8 variable-length byte patterns, surrogate pairs, and normalization forms

CT
Curious-Techie Engineering TeamVerified Author

Web Protocols & Security Architecture Research

Published:
•
Updated:
•7 min read
Authoritative Spec:RFC 9110(IETF)
Reviewed by Curious-Techie Architecture Peer Review Group

Overview & Scope

Unicode provides a unique number for every character, no matter what platform, device, application, or language. UTF-8 is the dominant encoding of the World Wide Web, accounting for over 98% of all web pages.

Specification Table & Matrix

Instant client-side filter by keyword, status code, or directive name

Key / CodeDefinition & DetailsGEO Semantic HierarchySpec & Notes
1-Byte UTF-8
1-Byte Sequence (ASCII Range)

Code points U+0000 to U+007F; bit pattern 0xxxxxxx.

U+0041 ("A") -> 0x41 (01000001)
●1-Byte UTF-8
↳Unicode encoding
↳UTF-8
↳ASCII compatible byte
RFC 3629 §3

Direct 1:1 binary match with 7-bit ASCII; zero translation overhead.

2-Byte UTF-8
2-Byte Sequence (Extended Latin, Greek, Hebrew)

Code points U+0080 to U+07FF; bit pattern 110xxxxx 10xxxxxx.

U+00E9 ("é") -> 0xC3 0xA9
●2-Byte UTF-8
↳Unicode encoding
↳UTF-8
↳two-byte sequence
RFC 3629 §3

First byte begins with 110; continuation byte begins with 10.

3-Byte UTF-8
3-Byte Sequence (Basic Multilingual Plane / CJK)

Code points U+0800 to U+FFFF; bit pattern 1110xxxx 10xxxxxx 10xxxxxx.

U+20AC ("€") -> 0xE2 0x82 0xAC
●3-Byte UTF-8
↳Unicode encoding
↳UTF-8
↳BMP three-byte sequence
RFC 3629 §3

Covers virtually all common modern world languages and typographic symbols.

4-Byte UTF-8
4-Byte Sequence (Astral Planes / Emojis)

Code points U+10000 to U+10FFFF; bit pattern 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx.

U+1F600 ("😀") -> 0xF0 0x9F 0x98 0x80
●4-Byte UTF-8
↳Unicode encoding
↳UTF-8
↳astral supplementary plane sequence
RFC 3629 §3

MySQL "utf8" only supports 3 bytes; databases must use "utf8mb4" to support 4-byte emojis.

NFC
NFC (Normalization Form C)

Canonical Decomposition followed by Canonical Composition.

Character "é" represented as single code point U+00E9.
●NFC
↳Unicode normalization
↳canonical composition
↳standard web string normalization
Unicode Standard Annex #15

The recommended standard normalization form for the World Wide Web (W3C).

NFD
NFD (Normalization Form D)

Canonical Decomposition; characters are separated into base character plus combining accents.

Character "é" represented as "e" (U+0065) + combining accent (U+0301).
●NFD
↳Unicode normalization
↳canonical decomposition
↳decomposed base and accents
Unicode Standard Annex #15

Default format used by macOS HFS+/APFS filesystem filenames, causing cross-platform string equality mismatches.

Implementation Example

String Length and Normalization Gotcha in JavaScript

javascriptCopy Code
// 1. Emoji length: Emojis use surrogate pairs in UTF-16 JavaScript strings!
const emoji = '🚀';
console.log(emoji.length); // 2 (UTF-16 code units, not characters!)
console.log([...emoji].length); // 1 (Correct Unicode code point count)

// 2. Normalization equality bug:
const str1 = 'café'; // NFC: U+0063 U+0061 U+0066 U+00E9
const str2 = 'cafe\u0301'; // NFD: 'e' + combining acute accent

console.log(str1 === str2); // FALSE! Visually identical, binary different!
console.log(str1.normalize('NFC') === str2.normalize('NFC')); // TRUE!

Always normalize user input to NFC before comparing passwords, usernames, or database search terms.

Frequently Asked Questions

Reference Standards Q&A

Why does MySQL fail when saving emojis in "utf8" columns?↓
MySQL legacy "utf8" encoding only supports up to 3 bytes per character. Emojis require 4 bytes (U+1F000+). You must alter the database character set to "utf8mb4".