UTF-32

Encoding & Standards

Eine Unicode-Kodierung fester Breite, die genau 4 Bytes pro Zeichen verwendet und eine direkte Codepoint-Zuordnung auf Kosten des Speicherplatzes ermöglicht.

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.

Verwandte Begriffe

BOM (BOM) BOM (BOM)
Die Byte-Reihenfolge-Markierung (U+FEFF) am Anfang einer Textdatei, die die Byte-Reihenfolge (Endianness) bei UTF-16/UTF-32-Kodierungen angibt.
Codeeinheit Codeeinheit
Die kleinste Bitkombination zur Kodierung eines Zeichens: 8 Bit für UTF-8, 16 Bit für UTF-16 und 32 Bit für UTF-32.
UTF-16 UTF-16
Eine Unicode-Kodierung variabler Breite, die 2 oder 4 Bytes pro Zeichen verwendet und intern von JavaScript, Java und Windows genutzt wird.
UTF-8 UTF-8
Eine Unicode-Kodierung variabler Breite, die 1 bis 4 Bytes pro Zeichen verwendet und im Web vorherrschend ist (mehr als 98 % aller Websites).

Verwandte Werkzeuge

🔢 Unicode-Suche Unicode-Suche
Geben Sie einen Codepoint wie U+1F600 ein und erhalten Sie das Emoji, Kodierungsdetails, UTF-8/16-Bytes und HTML-Entities.