silc_utf8_c2w

SYNOPSIS

    SilcUInt32 silc_utf8_c2w(const unsigned char *utf8,
                             SilcUInt32 utf8_len,
                             SilcUInt16 *utf8_wide,
                             SilcUInt32 utf8_wide_size);

DESCRIPTION

Converts UTF-8 string into UTF-8 wide character string into the `utf8_wide' buffer of size of `utf8_wide_size' in characters. Returns the length of the UTF-8 wide character string or 0 on error. The returned length is in characters and not in bytes. The byte length is twice the returned character length.

If there is extra space in `utf8_wide' this will NULL terminate the string automatically.