Mercurial > hg > sv-dependency-builds
annotate src/flac-1.2.1/include/share/utf8.h @ 23:619f715526df sv_v2.1
Update Vamp plugin SDK to 2.5
author | Chris Cannam |
---|---|
date | Thu, 09 May 2013 10:52:46 +0100 |
parents | 05aa0afa9217 |
children |
rev | line source |
---|---|
Chris@1 | 1 #ifndef SHARE__UTF8_H |
Chris@1 | 2 #define SHARE__UTF8_H |
Chris@1 | 3 |
Chris@1 | 4 /* |
Chris@1 | 5 * Convert a string between UTF-8 and the locale's charset. |
Chris@1 | 6 * Invalid bytes are replaced by '#', and characters that are |
Chris@1 | 7 * not available in the target encoding are replaced by '?'. |
Chris@1 | 8 * |
Chris@1 | 9 * If the locale's charset is not set explicitly then it is |
Chris@1 | 10 * obtained using nl_langinfo(CODESET), where available, the |
Chris@1 | 11 * environment variable CHARSET, or assumed to be US-ASCII. |
Chris@1 | 12 * |
Chris@1 | 13 * Return value of conversion functions: |
Chris@1 | 14 * |
Chris@1 | 15 * -1 : memory allocation failed |
Chris@1 | 16 * 0 : data was converted exactly |
Chris@1 | 17 * 1 : valid data was converted approximately (using '?') |
Chris@1 | 18 * 2 : input was invalid (but still converted, using '#') |
Chris@1 | 19 * 3 : unknown encoding (but still converted, using '?') |
Chris@1 | 20 */ |
Chris@1 | 21 |
Chris@1 | 22 int utf8_encode(const char *from, char **to); |
Chris@1 | 23 int utf8_decode(const char *from, char **to); |
Chris@1 | 24 |
Chris@1 | 25 #endif |