Fix various UTF8 parsing bugs.

In particular, parse bad UTF8 by replacing the broken bits with U+FFFD
and resychronise correctly after broken sequences.
This commit is contained in:
Stephen Dolan committed 2013-06-22 13:34:24 +01:00
1 parent 54b9c9bdb2
commit ff48bd6ec5
3 files changed
+76 -20

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@
#define JV_UNICODE_H
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);