16 #define UTF8_MAX_LEN 4 19 #define UTF8_MIN_TWO 0x80 22 #define UTF8_MIN_THREE 0x800 25 #define UTF8_MIN_FOUR 0x10000 28 #define UTF8_HIGH_BIT 0x80 31 #define UTF8_CONTINUATION_BITS 6 34 #define UTF8_CONTINUATION_MASK ( ( 1 << UTF8_CONTINUATION_BITS ) - 1 ) 37 #define UTF8_CONTINUATION 0x80 44 #define UTF8_IS_CONTINUATION( byte ) \ 45 ( ( (byte) & ~UTF8_CONTINUATION_MASK ) == UTF8_CONTINUATION ) 52 #define UTF8_IS_ASCII( byte ) ( ! ( (byte) & UTF8_HIGH_BIT ) ) 55 #define UTF8_INVALID 0xfffd
unsigned int remaining
Number of remaining continuation bytes.
unsigned int min
Minimum legal character.
unsigned int utf8_accumulate(struct utf8_accumulator *utf8, uint8_t byte)
Accumulate Unicode character from UTF-8 byte sequence.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
A UTF-8 character accumulator.
unsigned int character
Character in progress.