UTF-32
UTF-32 (32-bit Unicode Transformation Format), sometimes called UCS-4, is a fixed-length encoding used to encode Unicode code points that uses exactly 32 bits (four bytes) per code point (but a number of leading bits must be zero as there are far fewer than 2 32 Unicode code points, actually needing only 21 bits). In contrast, all other Unicode transformation formats are variable-length encodings. Each 32-bit value in UTF-32 represents one Unicode code point and is exactly equal to that code point's numerical value. The main advantage of UTF-32 is that the Unicode code points are directly indexed. Finding the Nth code point in a sequence of code points is a constant-time operation. In contrast, a variable-length code requires linear-time to count N code points from the start of the string. This makes UTF-32 a simple replacement in code that uses integers that are incremented by one to examine each location in a string, as was commonly done for ASCII. Novice programmers often vastly overestimate how useful this is. The main disadvantage of UTF-32 is that it is space-inefficient, using four bytes per code point, including 11 bits that are always zero. Characters beyond the BMP are relatively rare in most texts (except, for example, in the case of texts with some popular emojis), and can typically be ignored for sizing estimates.…
UTF-32 (32-bit Unicode Transformation Format), sometimes called UCS-4, is a fixed-length encoding used to encode Unicode code points that uses exactly 32 bits (four bytes) per code point (but a number of leading bits must be zero as there are far fewer than 2 32 Unicode code points, actually needing only 21 bits). In contrast, all other Unicode transformation formats are variable-length encodings. Each 32-bit value in UTF-32 represents one Unicode code point and is exactly equal to that code point's numerical value. The main advantage of UTF-32 is that the Unicode code points are directly indexed. Finding the Nth code point in a sequence of code points is a constant-time operation. In contrast, a variable-length code requires linear-time to count N code points from the start of the string. This makes UTF-32 a simple replacement in code that uses integers that are incremented by one to examine each location in a string, as was commonly done for ASCII. Novice programmers often vastly overestimate how useful this is. The main disadvantage of UTF-32 is that it is space-inefficient, using four bytes per code point, including 11 bits that are always zero. Characters beyond the BMP are relatively rare in most texts (except, for example, in the case of texts with some popular emojis), and can typically be ignored for sizing estimates. This makes UTF-32 close to twice the size of UTF-16. It can be up to four times the size of UTF-8 depending on how many of the characters are in the ASCII subset. include char32_t UTF32_character = U'🔟'; // also written as U'\U0001F51F' std::u32string UTF32_string = U"UTF–32-encoded string"; // defined as `const char32_t*´ C# has a UTF32Encoding class which represents Unicode characters as bytes, rather than as a string.
References
- Choisir et appliquer un encodage de caractères · retrieved 2024-11-10 · rev 1377743665
Cite this reference
MLA "Choisir et appliquer un encodage de caractères." 2024-11-10. https://www.w3.org/International/questions/qa-choosing-encodings.fr.html#avoid:~:text=particuli%C3%A8rement%20celle%20d%E2%80%99-,UTF-32,-.. Accessed 25 November 2026.
Chicago "Choisir et appliquer un encodage de caractères." 2024-11-10. https://www.w3.org/International/questions/qa-choosing-encodings.fr.html#avoid:~:text=particuli%C3%A8rement%20celle%20d%E2%80%99-,UTF-32,-..
APA encyclopegia.org. (2024). Choisir et appliquer un encodage de caractères. Retrieved November 25, 2026, from https://www.w3.org/International/questions/qa-choosing-encodings.fr.html#avoid:~:text=particuli%C3%A8rement%20celle%20d%E2%80%99-,UTF-32,-.
- PEP 393 -- Flexible String Representation · retrieved 2026-11-18 · rev 1377743665
Cite this reference
MLA "PEP 393 -- Flexible String Representation." Löwis, Martin. 2026-11-18. https://legacy.python.org/dev/peps/pep-0393/. Accessed 25 November 2026.
Chicago "PEP 393 -- Flexible String Representation." Löwis, Martin. 2026-11-18. https://legacy.python.org/dev/peps/pep-0393/.
APA Löwis, Martin. (2026). PEP 393 -- Flexible String Representation. Retrieved November 25, 2026, from https://legacy.python.org/dev/peps/pep-0393/
- JuliaStrings/LegacyStrings.jl: Legacy Unicode string types , JuliaStrings, 2019-05-17 , retrieved 2019-10-15 Wikipedia revision 1377743665, retrieved 2026-11-19 · retrieved 2019-10-14 · rev 1377743665
Cite this reference
MLA "JuliaStrings/LegacyStrings.jl: Legacy Unicode string types , JuliaStrings, 2019-05-17 , retrieved 2019-10-15 Wikipedia revision 1377743665, retrieved 2026-11-19." JuliaStrings/LegacyStrings. 2019-10-14. https://github.com/JuliaStrings/LegacyStrings.jl. Accessed 25 November 2026.
Chicago "JuliaStrings/LegacyStrings.jl: Legacy Unicode string types , JuliaStrings, 2019-05-17 , retrieved 2019-10-15 Wikipedia revision 1377743665, retrieved 2026-11-19." JuliaStrings/LegacyStrings. 2019-10-14. https://github.com/JuliaStrings/LegacyStrings.jl.
APA JuliaStrings/LegacyStrings. (2019). JuliaStrings/LegacyStrings.jl: Legacy Unicode string types , JuliaStrings, 2019-05-17 , retrieved 2019-10-15 Wikipedia revision 1377743665, retrieved 2026-11-19. Retrieved November 25, 2026, from https://github.com/JuliaStrings/LegacyStrings.jl
- UTF-8 Everywhere · retrieved 2026-11-18 · rev 1377743665
Cite this reference
MLA "UTF-8 Everywhere." 2026-11-18. http://utf8everywhere.org/. Accessed 25 November 2026.
Chicago "UTF-8 Everywhere." 2026-11-18. http://utf8everywhere.org/.
APA encyclopegia.org. (2026). UTF-8 Everywhere. Retrieved November 25, 2026, from http://utf8everywhere.org/
- u32string · retrieved 2024-11-11 · rev 1377743665
Cite this reference
MLA "u32string." 2024-11-11. https://cplusplus.com/reference/string/u32string/. Accessed 25 November 2026.
Chicago "u32string." 2024-11-11. https://cplusplus.com/reference/string/u32string/.
APA encyclopegia.org. (2024). u32string. Retrieved November 25, 2026, from https://cplusplus.com/reference/string/u32string/
- String literal - cppreference.com · retrieved 2024-11-13 · rev 1377743665
Cite this reference
MLA "String literal - cppreference.com." "String literal - cppreference. 2024-11-13. https://en.cppreference.com/w/cpp/language/string_literal. Accessed 25 November 2026.
Chicago "String literal - cppreference.com." "String literal - cppreference. 2024-11-13. https://en.cppreference.com/w/cpp/language/string_literal.
APA "String literal - cppreference. (2024). String literal - cppreference.com. Retrieved November 25, 2026, from https://en.cppreference.com/w/cpp/language/string_literal
- UTF32Encoding Class (System.Text) · retrieved 2024-11-26 · rev 1377743665
Cite this reference
MLA "UTF32Encoding Class (System.Text)." dotnet-bot. 2024-11-26. https://learn.microsoft.com/en-us/dotnet/api/system.text.utf32encoding?view=net-8.0. Accessed 25 November 2026.
Chicago "UTF32Encoding Class (System.Text)." dotnet-bot. 2024-11-26. https://learn.microsoft.com/en-us/dotnet/api/system.text.utf32encoding?view=net-8.0.
APA dotnet-bot. (2024). UTF32Encoding Class (System.Text). Retrieved November 25, 2026, from https://learn.microsoft.com/en-us/dotnet/api/system.text.utf32encoding?view=net-8.0
- Publicly Available Standards - ISO/IEC 10646:2020 · retrieved 2021-10-11 · rev 1377743665
Cite this reference
MLA "Publicly Available Standards - ISO/IEC 10646:2020." 2021-10-11. https://standards.iso.org/ittf/PubliclyAvailableStandards/index.html. Accessed 25 November 2026.
Chicago "Publicly Available Standards - ISO/IEC 10646:2020." 2021-10-11. https://standards.iso.org/ittf/PubliclyAvailableStandards/index.html.
APA encyclopegia.org. (2021). Publicly Available Standards - ISO/IEC 10646:2020. Retrieved November 25, 2026, from https://standards.iso.org/ittf/PubliclyAvailableStandards/index.html
- Mapping codepoints to Unicode encoding forms · retrieved 2022-10-02 · rev 1377743665
Cite this reference
MLA "Mapping codepoints to Unicode encoding forms." a b Constable, Peter (2001-06-13). 2022-10-02. https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=IWS-AppendixA. Accessed 25 November 2026.
Chicago "Mapping codepoints to Unicode encoding forms." a b Constable, Peter (2001-06-13). 2022-10-02. https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=IWS-AppendixA.
APA a b Constable, Peter (2001-06-13). (2022). Mapping codepoints to Unicode encoding forms. Retrieved November 25, 2026, from https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=IWS-AppendixA
- Annex B - The Universal Character Set (UCS) · retrieved 2022-10-02 · rev 1377743665
Cite this reference
MLA "Annex B - The Universal Character Set (UCS)." 2022-10-02. http://std.dkuug.dk/cen/tc304/guidecharactersets/guideannexb.html. Accessed 25 November 2026.
Chicago "Annex B - The Universal Character Set (UCS)." 2022-10-02. http://std.dkuug.dk/cen/tc304/guidecharactersets/guideannexb.html.
APA encyclopegia.org. (2022). Annex B - The Universal Character Set (UCS). Retrieved November 25, 2026, from http://std.dkuug.dk/cen/tc304/guidecharactersets/guideannexb.html
- C.2 Encoding Forms in ISO/IEC 10646 · retrieved 2026-11-18 · rev 1377743665
Cite this reference
MLA "C.2 Encoding Forms in ISO/IEC 10646." "C. 2026-11-18. https://www.unicode.org/versions/Unicode6.0.0/appC.pdf. Accessed 25 November 2026.
Chicago "C.2 Encoding Forms in ISO/IEC 10646." "C. 2026-11-18. https://www.unicode.org/versions/Unicode6.0.0/appC.pdf.
APA "C. (2026). C.2 Encoding Forms in ISO/IEC 10646. Retrieved November 25, 2026, from https://www.unicode.org/versions/Unicode6.0.0/appC.pdf
- For UTF-8: Select point to truncate at. If the byte before it is 0-0x7F, or the byte after it is anything other than the continuation bytes 0x80-0xBF, the string can be truncated at that point. Otherwise search up to 3 bytes backwards for such a point and truncate at that. If not found, truncate at the original position. This works even if there are encoding errors in the UTF-8. UTF-16 is trivial and only has to back up one word at most. Wikipedia revision 1377743665, retrieved 2026-11-19 · retrieved 2026-11-18 · rev 1377743665
Cite this reference
MLA "For UTF-8: Select point to truncate at. If the byte before it is 0-0x7F, or the byte after it is anything other than the continuation bytes 0x80-0xBF, the string can be truncated at that point. Otherwise search up to 3 bytes backwards for such a point and truncate at that. If not found, truncate at the original position. This works even if there are encoding errors in the UTF-8. UTF-16 is trivial and only has to back up one word at most. Wikipedia revision 1377743665, retrieved 2026-11-19." For UTF-8: Select point to truncate at. 2026-11-18. https://en.wikipedia.org/w/index.php?oldid=1377743665. Accessed 25 November 2026.
Chicago "For UTF-8: Select point to truncate at. If the byte before it is 0-0x7F, or the byte after it is anything other than the continuation bytes 0x80-0xBF, the string can be truncated at that point. Otherwise search up to 3 bytes backwards for such a point and truncate at that. If not found, truncate at the original position. This works even if there are encoding errors in the UTF-8. UTF-16 is trivial and only has to back up one word at most. Wikipedia revision 1377743665, retrieved 2026-11-19." For UTF-8: Select point to truncate at. 2026-11-18. https://en.wikipedia.org/w/index.php?oldid=1377743665.
APA For UTF-8: Select point to truncate at. (2026). For UTF-8: Select point to truncate at. If the byte before it is 0-0x7F, or the byte after it is anything other than the continuation bytes 0x80-0xBF, the string can be truncated at that point. Otherwise search up to 3 bytes backwards for such a point and truncate at that. If not found, truncate at the original position. This works even if there are encoding errors in the UTF-8. UTF-16 is trivial and only has to back up one word at most. Wikipedia revision 1377743665, retrieved 2026-11-19. Retrieved November 25, 2026, from https://en.wikipedia.org/w/index.php?oldid=1377743665
- 👨🦲 Man: Bald Emoji · retrieved 2021-10-11 · rev 1377743665
Cite this reference
MLA "👨🦲 Man: Bald Emoji." 2021-10-11. https://emojipedia.org/man-bald/. Accessed 25 November 2026.
Chicago "👨🦲 Man: Bald Emoji." 2021-10-11. https://emojipedia.org/man-bald/.
APA encyclopegia.org. (2021). 👨🦲 Man: Bald Emoji. Retrieved November 25, 2026, from https://emojipedia.org/man-bald/
- HTML Standard · retrieved 2024-11-10 · rev 1377743665
Cite this reference
MLA "HTML Standard." 2024-11-10. https://html.spec.whatwg.org/multipage/parsing.html#character-encodings. Accessed 25 November 2026.
Chicago "HTML Standard." 2024-11-10. https://html.spec.whatwg.org/multipage/parsing.html#character-encodings.
APA encyclopegia.org. (2024). HTML Standard. Retrieved November 25, 2026, from https://html.spec.whatwg.org/multipage/parsing.html#character-encodings
- FAQ - UTF-8, UTF-16, UTF-32 & BOM · retrieved 2022-09-03 · rev 1377743665
Cite this reference
MLA "FAQ - UTF-8, UTF-16, UTF-32 & BOM." a b "FAQ - UTF-8, UTF-16, UTF-32 & BOM". 2022-09-03. http://unicode.org/faq/utf_bom.html#utf32-2. Accessed 25 November 2026.
Chicago "FAQ - UTF-8, UTF-16, UTF-32 & BOM." a b "FAQ - UTF-8, UTF-16, UTF-32 & BOM". 2022-09-03. http://unicode.org/faq/utf_bom.html#utf32-2.
APA a b "FAQ - UTF-8, UTF-16, UTF-32 & BOM". (2022). FAQ - UTF-8, UTF-16, UTF-32 & BOM. Retrieved November 25, 2026, from http://unicode.org/faq/utf_bom.html#utf32-2
- Let's Stop Ascribing Meaning to Code Points · retrieved 2020-06-13 · rev 1377743665
Cite this reference
MLA "Let's Stop Ascribing Meaning to Code Points." a b Goregaokar, Manish (January 14, 2017). 2020-06-13. https://manishearth.github.io/blog/2017/01/14/stop-ascribing-meaning-to-unicode-code-points/. Accessed 25 November 2026.
Chicago "Let's Stop Ascribing Meaning to Code Points." a b Goregaokar, Manish (January 14, 2017). 2020-06-13. https://manishearth.github.io/blog/2017/01/14/stop-ascribing-meaning-to-unicode-code-points/.
APA a b Goregaokar, Manish (January 14, 2017). (2020). Let's Stop Ascribing Meaning to Code Points. Retrieved November 25, 2026, from https://manishearth.github.io/blog/2017/01/14/stop-ascribing-meaning-to-unicode-code-points/
Cite this article
MLA
"UTF-32." encyclopegia.org, 2026, https://encyclopegia.org/wiki/utf-32. Accessed 25 November 2026.
Chicago
"UTF-32." encyclopegia.org. Accessed November 25, 2026. https://encyclopegia.org/wiki/utf-32.
APA
encyclopegia.org. (2026). UTF-32. Retrieved November 25, 2026, from https://encyclopegia.org/wiki/utf-32
Accessed November 25, 2026 · CC BY-SA 4.0 · citation page · JSON