[#BloombergLP-bdlde-CharConvertUcs2-utf8ToUcs2-06]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlde.adoc[bdlde]::xref:BloombergLP/bdlde/CharConvertUcs2.adoc[CharConvertUcs2]::utf8ToUcs2
:relfileprefix: ../../../
:mrdocs:

Load into `result` the UCS&hyphen;2 conversion of the null&hyphen;terminated UTF&hyphen;8 `srcString`&period; Return 0 on success and a non&hyphen;zero status otherwise&period;

== Synopsis

Declared in `&lt;bdlde&lowbar;charconvertucs2&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
utf8ToUcs2(
    xref:bsl/vector-00d.adoc[bsl::vector&lt;unsigned short&gt;]* result,
    char const* srcString,
    unsigned short errorCharacter = &apos;?&apos;);
----


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