annotate src/flac-1.2.1/include/share/utf8.h @ 141:1b5b6dfd0d0e

Add updated build of PortAudio for OSX
author Chris Cannam <cannam@all-day-breakfast.com>
date Tue, 03 Jan 2017 15:10:52 +0000
parents 98c1576536ae
children
rev   line source
cannam@86 1 #ifndef SHARE__UTF8_H
cannam@86 2 #define SHARE__UTF8_H
cannam@86 3
cannam@86 4 /*
cannam@86 5 * Convert a string between UTF-8 and the locale's charset.
cannam@86 6 * Invalid bytes are replaced by '#', and characters that are
cannam@86 7 * not available in the target encoding are replaced by '?'.
cannam@86 8 *
cannam@86 9 * If the locale's charset is not set explicitly then it is
cannam@86 10 * obtained using nl_langinfo(CODESET), where available, the
cannam@86 11 * environment variable CHARSET, or assumed to be US-ASCII.
cannam@86 12 *
cannam@86 13 * Return value of conversion functions:
cannam@86 14 *
cannam@86 15 * -1 : memory allocation failed
cannam@86 16 * 0 : data was converted exactly
cannam@86 17 * 1 : valid data was converted approximately (using '?')
cannam@86 18 * 2 : input was invalid (but still converted, using '#')
cannam@86 19 * 3 : unknown encoding (but still converted, using '?')
cannam@86 20 */
cannam@86 21
cannam@86 22 int utf8_encode(const char *from, char **to);
cannam@86 23 int utf8_decode(const char *from, char **to);
cannam@86 24
cannam@86 25 #endif