Function silc_utf8_decode
SYNOPSIS
SilcUInt32 silc_utf8_decode(const unsigned char *utf8,
SilcUInt32 utf8_len,
SilcStringEncoding bin_encoding,
unsigned char *bin, SilcUInt32 bin_size);
DESCRIPTION
Decodes UTF-8 encoded string `utf8' to string of which encoding is
to be `bin_encoding', into the `bin' buffer of size of `bin_size'.
Returns the length of the decoded buffer, or zero (0) on error.
By default `bin_encoding' is ASCII, and the caller needs to know to
which encoding the output string is to be encoded if ASCII is not
desired.
|