4 /* Returns -2 = invalid, -1 = need more data, otherwise unichar. */
5 unichar get_utf8_char(const unsigned char **ptr, int len);
7 /* Returns length of UTF8 string */
8 int strlen_utf8(const char *str);
10 /* UTF-8 -> unichar string. The NUL is copied as well. */
11 void utf8_to_utf16(const char *str, unichar *out);
13 /* unichar -> UTF-8 string. outbuf must be at least 6 chars long.
14 Returns outbuf string length. */
15 int utf16_char_to_utf8(unichar c, char *outbuf);
17 /* unichar -> UTF-8 string. The NUL is copied as well.
18 Make sure out is at least 6 x length of str. */
19 void utf16_to_utf8(const unichar *str, char *out);