Blame include/share/utf8.h

Packit Service 065837
#ifndef SHARE__UTF8_H
Packit Service 065837
#define SHARE__UTF8_H
Packit Service 065837
Packit Service 065837
/*
Packit Service 065837
 * Convert a string between UTF-8 and the locale's charset.
Packit Service 065837
 * Invalid bytes are replaced by '#', and characters that are
Packit Service 065837
 * not available in the target encoding are replaced by '?'.
Packit Service 065837
 *
Packit Service 065837
 * If the locale's charset is not set explicitly then it is
Packit Service 065837
 * obtained using nl_langinfo(CODESET), where available, the
Packit Service 065837
 * environment variable CHARSET, or assumed to be US-ASCII.
Packit Service 065837
 *
Packit Service 065837
 * Return value of conversion functions:
Packit Service 065837
 *
Packit Service 065837
 *  -1 : memory allocation failed
Packit Service 065837
 *   0 : data was converted exactly
Packit Service 065837
 *   1 : valid data was converted approximately (using '?')
Packit Service 065837
 *   2 : input was invalid (but still converted, using '#')
Packit Service 065837
 *   3 : unknown encoding (but still converted, using '?')
Packit Service 065837
 */
Packit Service 065837
Packit Service 065837
int utf8_encode(const char *from, char **to);
Packit Service 065837
int utf8_decode(const char *from, char **to);
Packit Service 065837
Packit Service 065837
#endif