unichar.h revision 54df49100a0111a956662cb8a327969badd2d72d
#ifndef UNICHAR_H
#define UNICHAR_H
extern const uint8_t *const uni_utf8_non1_bytes;
/* Returns number of characters in a NUL-terminated unicode string */
/* Translates UTF-8 input to UCS-4 output. Returns 0 if ok, -1 if input was
invalid */
/* Translates UCS-4 input to UTF-8 output. */
/* Returns 1 if *chr_r is set, 0 for incomplete trailing character,
-1 for invalid input. */
/* Returns UTF-8 string length with maximum input size. */
/* Returns the number of bytes belonging to this partial UTF-8 character.
Invalid input is returned with length 1. */
static inline unsigned int uni_utf8_char_bytes(char chr)
{
/* 0x00 .. 0x7f are ASCII. 0x80 .. 0xC1 are invalid. */
return 1;
}
/* Return given character in titlecase. */
/* 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. */
/* If input contains only valid UTF-8 characters, return TRUE. If input
contains invalid UTF-8 characters, write only the valid ones to buf and
return FALSE. */
#endif