Mercurial > dovecot > original-hg > dovecot-1.2
diff src/lib/unichar.h @ 6129:04b9eb27283c HEAD
Added uni_ucs4_to_titlecase() and uni_utf8_to_decomposed_titlecase(). They
use a unicharmap.c file generated from UnicodeData.txt.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 20 Jul 2007 17:25:16 +0300 |
parents | 8101787cdd1c |
children | e4eb71ae8e96 |
line wrap: on
line diff
--- a/src/lib/unichar.h Fri Jul 20 17:21:53 2007 +0300 +++ b/src/lib/unichar.h Fri Jul 20 17:25:16 2007 +0300 @@ -31,4 +31,13 @@ return uni_utf8_non1_bytes[(uint8_t)chr - (192 + 2)]; } +/* Return given character in titlecase. */ +unichar_t uni_ucs4_to_titlecase(unichar_t chr); + +/* Convert UTF-8 input to titlecase and decompose the titlecase characters to + output buffer. Returns 0 if ok, -1 if input was invalid. This generates + output that's compatible with i;unicode-casemap comparator. */ +int uni_utf8_to_decomposed_titlecase(const void *input, size_t max_len, + buffer_t *output); + #endif