char8_t
From cppreference.com
Defined in header <uchar.h>
|
||
typedef unsigned char char8_t; |
(since C23) | |
char8_t is an unsigned integer type used for UTF-8 and is the same type as unsigned char.
Example
Run this code
Possible output:
11 UTF-8 code units: [ 7A C3 9F E6 B0 B4 F0 9F 8D 8C 00 ]
References
- C23 standard (ISO/IEC 9899:2024):
- 7.30 Unicode utilities <uchar.h> (p: 410)
See also
C++ documentation for Fundamental types
|