[#OPENSSL_uni2utf8]
= OPENSSL&lowbar;uni2utf8
:mrdocs:

Convert a PKCS&num;12 BMPString (big&hyphen;endian UTF&hyphen;16) to a UTF&hyphen;8 C string&period;

== Synopsis

Declared in `&lt;openssl&sol;pkcs12&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
char*
OPENSSL&lowbar;uni2utf8(
    unsigned char const* uni,
    int unilen);
----

== Return Value

Newly allocated UTF&hyphen;8 string, or NULL on error&period; Falls back to OPENSSL&lowbar;uni2asc() if decoding fails&period; Caller frees with OPENSSL&lowbar;free()&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *uni*
| BMPString octets (even length)&period;
| *unilen*
| Length of `uni` in bytes&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
