[#BloombergLP-bdlde-CharConvertUtf16-utf8ToUtf16-09] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlde.adoc[bdlde]::xref:BloombergLP/bdlde/CharConvertUtf16.adoc[CharConvertUtf16]::utf8ToUtf16 :relfileprefix: ../../../ :mrdocs: Load into the destination the UTF‐16 conversion of the UTF‐8 source. Return 0 on success and a non‐zero status otherwise. See the overload taking `bsl::wstring` for full contract details. == Synopsis Declared in `<bdlde_charconvertutf16.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int utf8ToUtf16( std::pmr::u16string* dstString, std::string_view const& srcString, std::size_t* numCodePointsWritten = 0, char16_t errorChar = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#