IANA 문자셋
IANA가 관리하는 문자 인코딩 이름의 공식 레지스트리로, HTTP Content-Type 헤더와 MIME에서 사용됩니다(예: charset=utf-8).
What is IANA Charset?
IANA charset names are the official, standardized names for character encoding schemes registered with the Internet Assigned Numbers Authority (IANA). These names are used in internet protocols — HTTP Content-Type headers, MIME email headers, XML declarations, HTML <meta charset> tags, and many other contexts — to unambiguously identify which character encoding is in use.
The IANA Maintained Media Types and Charset registry ensures that when a web server says charset=utf-8 and a browser receives that header, both sides agree on exactly what "utf-8" means. Without this standardization, the same encoding could have a dozen different names across different systems, making interoperability impossible.
How IANA Charset Names Work
IANA maintains a registry at https://www.iana.org/assignments/character-sets/ that lists every registered charset. Each entry includes:
- Name: The preferred (canonical) IANA name (e.g.,
UTF-8) - Aliases: Alternative names that should be treated as equivalent (e.g.,
UTF8,utf8,csUTF8) - MIBenum: A numeric identifier (useful for protocols that prefer numbers over strings)
- References: The standards documents that define the encoding
- Status: Whether the charset is still recommended
The names are case-insensitive per the IANA registry rules: UTF-8, utf-8, and Utf-8 are all valid references to the same charset.
Common IANA Charset Names
| IANA Name | Aliases | Notes |
|---|---|---|
UTF-8 |
utf8, csUTF8 |
Web default, strongly preferred |
UTF-16 |
UTF16 |
With BOM |
UTF-16BE |
UTF-16BE |
Big endian, no BOM |
UTF-16LE |
UTF-16LE |
Little endian, no BOM |
UTF-32 |
— | With BOM |
ISO-8859-1 |
latin1, latin-1, ISO_8859-1 |
Latin-1 |
ISO-8859-15 |
latin9, latin-9 |
Latin-1 + Euro sign |
windows-1252 |
cp1252, x-cp1252 |
ANSI Western European |
Shift_JIS |
SJIS, MS_Kanji |
Japanese |
EUC-JP |
csEUCPkdFmtJapanese |
Japanese (Unix) |
EUC-KR |
csEUCKR |
Korean (Unix) |
Big5 |
csBig5 |
Traditional Chinese |
GB2312 |
csGB2312 |
Simplified Chinese |
KOI8-R |
csKOI8R |
Russian (Unix) |
US-ASCII |
ASCII, ANSI_X3.4-1968, iso-ir-6 |
7-bit ASCII |
IANA Charsets in Web Contexts
HTTP and HTML both use IANA charset names:
Content-Type: text/html; charset=UTF-8
Content-Type: text/plain; charset=windows-1252
Content-Type: application/json; charset=utf-8
<!-- HTML5 shorthand (preferred): -->
<meta charset="utf-8">
<!-- Legacy HTML4 form: -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- XML declaration: -->
<?xml version="1.0" encoding="UTF-8"?>
WHATWG Encoding Standard and IANA
For web browsers, the authoritative reference is the WHATWG Encoding Standard (encoding.spec.whatwg.org), which defines a specific subset of IANA charsets and their aliases. The WHATWG standard is intentionally restrictive — it excludes obscure or harmful encodings and provides precise byte-level semantics for the encodings it does support.
Notably, the WHATWG standard defines ISO-8859-1 as an alias for windows-1252 (see the windows-1252 entry), which diverges from the strict IANA definition but reflects real-world browser behavior.
# Python: IANA charset names and Python codec names
# Python often uses its own names but accepts many IANA aliases
import codecs
# Look up codec information by IANA-style name
codec = codecs.lookup('utf-8')
print(codec.name) # 'utf-8'
codec2 = codecs.lookup('shift_jis')
print(codec2.name) # 'shift_jis'
# Python accepts most IANA aliases
'hello'.encode('US-ASCII') # Works
'hello'.encode('ANSI_X3.4-1968') # Also works — IANA alias
'hello'.encode('iso-8859-1') # Works
'hello'.encode('latin-1') # Also works — IANA alias
MIBenum: Numeric Identifiers
IANA assigns a numeric MIBenum to each charset for protocols that prefer numbers. This is used in some SNMP, LDAP, and telnet applications:
| MIBenum | IANA Name |
|---|---|
| 3 | US-ASCII |
| 4 | ISO-8859-1 |
| 17 | Shift_JIS |
| 36 | KS_C_5601-1987 (EUC-KR basis) |
| 106 | UTF-8 |
| 1013 | UTF-16BE |
| 1014 | UTF-16LE |
| 1015 | UTF-16 |
| 1017 | UTF-32 |
Quick Facts
| Property | Value |
|---|---|
| Registry | IANA (Internet Assigned Numbers Authority) |
| Registry URL | iana.org/assignments/character-sets/ |
| Case sensitivity | Case-insensitive |
| Preferred web charset | UTF-8 |
| Numeric IDs | MIBenum |
| Web browser reference | WHATWG Encoding Standard |
| Python codec lookup | codecs.lookup(name) |
Common Pitfalls
Using non-IANA names in HTTP headers. Some servers emit charset=UTF8 (no hyphen) or charset=utf_8 (underscore). While many clients accept these, they are not canonical IANA names. The correct form is charset=utf-8 or charset=UTF-8.
The IANA vs. WHATWG divergence. IANA lists many encodings that modern browsers no longer support or that map to different behavior. For web development, use the WHATWG Encoding Standard as the authoritative reference, not raw IANA data.
Deprecated charsets. Some IANA-registered charsets are deprecated or have known security issues. For example, UTF-7 (MIBenum 1012) is deprecated and has been used in cross-site scripting (XSS) attacks. Never use UTF-7 on the web. Similarly, BOCU-1 and SCSU are IANA-registered but not web-safe.
Charset vs. encoding vs. codec. These three terms are used interchangeably in many contexts but are technically distinct. "Charset" is the IANA term for a registered encoding specification. "Encoding" is the general term for the byte-to-character mapping scheme. "Codec" is a software implementation of an encoding (encoder + decoder). In practice, the terms are used interchangeably in web and programming contexts.
관련 용어
인코딩의 더 많은 용어
미국 정보 교환 표준 부호. 0~127의 128개 문자를 다루는 7비트 인코딩으로, 제어 …
Visual art created from text characters, originally limited to the 95 printable …
Binary-to-text encoding that represents binary data using 64 ASCII characters (A–Z, a–z, …
주로 대만과 홍콩에서 사용되는 번체 중국어 문자 인코딩으로, 약 13,000개의 CJK 문자를 …
확장 이진화 십진법 교환 부호. 문자 범위가 연속적이지 않은 IBM 메인프레임 인코딩으로, …
KS X 1001 기반의 한국어 문자 인코딩으로, 한글 음절과 한자를 2바이트 시퀀스에 …
간체 중국어 문자 인코딩 체계: GB2312(6,763자)에서 GBK를 거쳐 GB18030으로 발전하였으며, 유니코드와 호환되는 …
서로 다른 언어권을 위한 8비트 단일 바이트 인코딩 모음. ISO 8859-1(Latin-1)은 유니코드 …
단일 바이트 ASCII/JIS 로만과 이중 바이트 JIS X 0208 한자를 결합한 일본어 …
BMP(U+0000~U+FFFF)만 지원하는 구식 고정 2바이트 인코딩. UTF-16의 전신으로 보충 문자를 표현할 수 …