18 lines
315 B
C
18 lines
315 B
C
#ifndef UTF8_H
|
|
#define UTF8_H
|
|
|
|
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
|
|
#define UTF_INVALID 0xFFFD
|
|
#define UTF_SIZE 4
|
|
|
|
typedef uint_least32_t Rune;
|
|
|
|
size_t utf8decode(const char *, Rune *, size_t);
|
|
Rune utf8decodebyte(char, size_t *);
|
|
char utf8encodebyte(Rune, size_t);
|
|
size_t utf8validate(Rune *, size_t);
|
|
|
|
#endif
|