UTF-32

Encoding & Standards

문자당 정확히 4바이트를 사용하는 고정 너비 유니코드 인코딩으로, 직접적인 코드 포인트 매핑을 제공합니다.

UTF-32 is the simplest Unicode encoding: every character uses exactly 4 bytes, and the value directly corresponds to the code point. This makes random access and character counting trivial.

However, UTF-32 uses 4x the memory of ASCII text and 2x that of UTF-16 for most common characters. It's rarely used for storage or transmission but can be convenient for internal string processing.

Python 3's internal string representation uses a variable-width encoding (Latin-1, UCS-2, or UCS-4) depending on the highest code point in the string, which is why `len('😀')` correctly returns 1.

관련 용어

바이트 순서 표시 (BOM) 바이트 순서 표시 (BOM)
UTF-16/UTF-32 인코딩에서 바이트 순서를 나타내기 위해 텍스트 파일 시작 부분에 배치되는 U+FEFF 문자.
코드 유닛 코드 유닛
문자 인코딩의 최소 비트 조합: UTF-8은 8비트, UTF-16은 16비트, UTF-32는 32비트.
UTF-16 UTF-16
문자당 2 또는 4바이트를 사용하는 가변 너비 유니코드 인코딩으로, JavaScript와 Java에서 사용됩니다.
UTF-8 UTF-8
문자당 1~4바이트를 사용하는 가변 너비 유니코드 인코딩으로, 웹의 98% 이상에서 사용됩니다.

관련 도구

🔢 Unicode 조회 Unicode 조회
U+1F600과 같은 코드포인트를 입력하면 해당 이모지, 인코딩 세부 정보, UTF-8/16 바이트, HTML 엔티티를 확인할 수 있습니다.