Read additional bytes from the file to complete the UTF-8 sequence so the bytes in it don't get converted to U+FFFD replacement characters.
13 lines
406 B
C
13 lines
406 B
C
#ifndef JV_UNICODE_H
|
|
#define JV_UNICODE_H
|
|
|
|
const char* jvp_utf8_backtrack(const char* start, const char* min, int *missing_bytes);
|
|
const char* jvp_utf8_next(const char* in, const char* end, int* codepoint);
|
|
int jvp_utf8_is_valid(const char* in, const char* end);
|
|
|
|
int jvp_utf8_decode_length(char startchar);
|
|
|
|
int jvp_utf8_encode_length(int codepoint);
|
|
int jvp_utf8_encode(int codepoint, char* out);
|
|
#endif
|