[ << ] | [ >> ] |  |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

# 3. Elementary types `<unitypes.h>`

The include file `<unitypes.h>` provides the following basic types.

Type: uint8_t
Type: uint16_t
Type: uint32_t

  These are the storage units of UTF-8/16/32 strings, respectively. The definitions are taken from `<stdint.h>`, on platforms where this include file is present.

Type: ucs4_t

  This type represents a single Unicode character, outside of an UTF-32 string.

The types `ucs4_t` and `uint32_t` happen to be identical. They differ in use and intent, however:

- Use `uint32_t *` to designate an UTF-32 string. Use `ucs4_t` to designate a single Unicode character, outside of an UTF-32 string.
- Conversions functions that take an UTF-32 string as input will usually perform a range-check on the `uint32_t` values. Whereas functions that are declared to take `ucs4_t` arguments will not perform such a range-check.

[ << ] | [ >> ] |  |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

This document was generated by Bruno Haible on October, 16 2024 using texi2html 1.78a.