100% 브라우저 메모리 연산 • 서버 로그 수집 제로 • 즉각적인 실행
Curious Techie개발자 툴박스
Encodings & FormatsThe Unicode Consortium / Unicode Standard 15.0 / RFC 3629✓ 빠른 조회 매트릭스 표 (6 개 항목) • KO

유니코드 (Unicode) 및 UTF-8 인코딩 표준 레퍼런스

코드 포인트(Code Points), 가변 바이트 구조, 서러게이트 페어 및 정규화

CT
Curious-Techie Engineering Team검증된 작성자

Web Protocols & Security Architecture Research

발행일:
•
수정일:
•7 min read
공식 기술 규격:RFC 9110(IETF)
검토자: Curious-Techie Architecture Peer Review Group

개요 및 범위

Unicode 표준과 RFC 3629 규격은 다국어 문자 깨짐 현상을 방지하고 글로벌 데이터베이스의 일관성을 유지하는 표준입니다.

표준 규격표 및 매트릭스

키워드, 상태 코드 또는 지시문 이름으로 실시간 검색

키 / 코드정의 및 세부사항GEO 시맨틱 계층표준 규격 및 참고
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.

기술 예제 및 실행 코드

String Length and Normalization Gotcha in JavaScript

javascript코드 복사
// 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.

자주 묻는 질문 (FAQ)

표준 규격 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".