cat_utftolatin1 - convert UTF-8 to iso8859-1 (latin1)
#include <cat/catutil.h>
int cat_utftolatin1(const char *input, char **output, int unknown);
This function converts the UTF-8 encoded character string input to iso8859-1 (latin1). If unknown is non-zero, it is inserted in place of any characters that cannot be
represented in a single byte. Such characters are otherwise ignored in the
output.
The result is allocated and the address to the result is stored in the
output argument. Deallocate the result with free().
Returns the number of bytes in the result, or a negative code on error.
cat, catutil, cat_latin1toutf