3 * Convert a string between UTF-8 and the locale's charset.
4 * Invalid bytes are replaced by '#', and characters that are
5 * not available in the target encoding are replaced by '?'.
7 * If the locale's charset is not set explicitly then it is
8 * obtained using nl_langinfo(CODESET), where available, the
9 * environment variable CHARSET, or assumed to be US-ASCII.
11 * Return value of conversion functions:
13 * -1 : memory allocation failed
14 * 0 : data was converted exactly
15 * 1 : valid data was converted approximately (using '?')
16 * 2 : input was invalid (but still converted, using '#')
17 * 3 : unknown encoding (but still converted, using '?')
27 void convert_set_charset(const char *charset
);
29 int utf8_encode(const char *from
, char **to
);
30 int utf8_decode(const char *from
, char **to
);
31 int utf8_validate(const char *from
);