Mercurial > dovecot > original-hg > dovecot-1.2
diff src/lib/unichar.h @ 6951:1f70c72e4312 HEAD
Moved uni_utf8_get_valid_data() to lib/
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 08 Dec 2007 15:45:17 +0200 |
parents | e4eb71ae8e96 |
children | 08e4d7efcd6a |
line wrap: on
line diff
--- a/src/lib/unichar.h Sat Dec 08 15:42:25 2007 +0200 +++ b/src/lib/unichar.h Sat Dec 08 15:45:17 2007 +0200 @@ -40,4 +40,11 @@ int uni_utf8_to_decomposed_titlecase(const void *input, size_t max_len, buffer_t *output); +/* If input contains only valid UTF-8 input, return it directly. If input + contains invalid UTF-8 input, write only valid UTF-8 characters to the + given buffer and return it. */ +const unsigned char * +uni_utf8_get_valid_data(const unsigned char *input, size_t size, + buffer_t *tmpbuf, size_t *output_size_r); + #endif