comparison src/flac-1.2.1/include/share/utf8.h @ 1:05aa0afa9217

Bring in flac, ogg, vorbis
author Chris Cannam
date Tue, 19 Mar 2013 17:37:49 +0000
parents
children
comparison
equal deleted inserted replaced
0:c7265573341e 1:05aa0afa9217
1 #ifndef SHARE__UTF8_H
2 #define SHARE__UTF8_H
3
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 '?'.
8 *
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.
12 *
13 * Return value of conversion functions:
14 *
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 '?')
20 */
21
22 int utf8_encode(const char *from, char **to);
23 int utf8_decode(const char *from, char **to);
24
25 #endif