15 #define UTF8_MAX_LEN 4 18 #define UTF8_MIN_TWO 0x80 21 #define UTF8_MIN_THREE 0x800 24 #define UTF8_MIN_FOUR 0x10000 27 #define UTF8_HIGH_BIT 0x80 30 #define UTF8_CONTINUATION_BITS 6 33 #define UTF8_CONTINUATION_MASK ( ( 1 << UTF8_CONTINUATION_BITS ) - 1 ) 36 #define UTF8_CONTINUATION 0x80 43 #define UTF8_IS_CONTINUATION( byte ) \ 44 ( ( (byte) & ~UTF8_CONTINUATION_MASK ) == UTF8_CONTINUATION ) 51 #define UTF8_IS_ASCII( byte ) ( ! ( (byte) & UTF8_HIGH_BIT ) ) 54 #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.