Fix compiler warnings from new compiler flags.
[flac.git] / include / share / utf8.h
blob7d6650d60d9bdaaf147369a38ee56a3928e05dce
1 #ifndef SHARE__UTF8_H
2 #define SHARE__UTF8_H
4 /*
5 * Convert a string between UTF-8 and the locale's charset.
6 * Invalid bytes are replaced by '#', and characters that are
7 * not available in the target encoding are replaced by '?'.
9 * If the locale's charset is not set explicitly then it is
10 * obtained using nl_langinfo(CODESET), where available, the
11 * environment variable CHARSET, or assumed to be US-ASCII.
13 * Return value of conversion functions:
15 * -1 : memory allocation failed
16 * 0 : data was converted exactly
17 * 1 : valid data was converted approximately (using '?')
18 * 2 : input was invalid (but still converted, using '#')
19 * 3 : unknown encoding (but still converted, using '?')
22 int utf8_encode(const char *from, char **to);
23 int utf8_decode(const char *from, char **to);
25 #endif