diff options
author | pgen <p.gen.progs@gmail.com> | 2021-02-19 22:08:22 +0100 |
---|---|---|
committer | pgen <p.gen.progs@gmail.com> | 2021-02-19 23:31:04 +0100 |
commit | df9f37847eca8da7dbae177b8e70582af0ea8c6f (patch) | |
tree | ed31655543b01fe30bdc71f34961ec772b62bec1 /utf8.h | |
parent | 0a398c7bb7deab04f61861fd4423c289a4a5db0b (diff) |
Change the implementation of utf8_validate
Thanks to Markus Kuhn for this code. The old implementation was not
foolproof.
Diffstat (limited to 'utf8.h')
-rw-r--r-- | utf8.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -42,8 +42,8 @@ cptoutf8(char * utf8_str, uint32_t c); int utf8_interpret(char * s, langinfo_t * langinfo, char sc); -int -utf8_validate(const char * str, size_t length); +unsigned char * +utf8_validate(unsigned char * str); char * utf8_prev(const char * str, const char * p); |