diff options
author | William Langford <wlangfor@gmail.com> | 2017-01-24 23:05:47 -0500 |
---|---|---|
committer | William Langford <wlangfor@gmail.com> | 2017-01-27 21:04:26 -0500 |
commit | e84d17196c03da6e6dc56f4fcd319a7fe84f8dbc (patch) | |
tree | a69bd988a82c256dbeb78c045137e08b1da55325 /src/jv_unicode.h | |
parent | fd4ae8304e23007672af9a37855c7a76de7c78cf (diff) |
Handle cut-off UTF-8 sequences when reading files
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.
Diffstat (limited to 'src/jv_unicode.h')
-rw-r--r-- | src/jv_unicode.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/jv_unicode.h b/src/jv_unicode.h index 579c910e..558721a8 100644 --- a/src/jv_unicode.h +++ b/src/jv_unicode.h @@ -1,6 +1,7 @@ #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); |