[#BloombergLP-bdlde-CharConvertUtf32-utf32ToUtf8-01] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlde.adoc[bdlde]::xref:BloombergLP/bdlde/CharConvertUtf32.adoc[CharConvertUtf32]::utf32ToUtf8 :relfileprefix: ../../../ :mrdocs: Convert the UTF‐32 source into UTF‐8 in the destination vector. == Synopsis Declared in `<bdlde_charconvertutf32.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int utf32ToUtf8( std::pmr::vector<char>* dstVector, unsigned int const* srcString, std::size_t* numCodePointsWritten = 0, unsigned char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- == Description Load into the destination the UTF‐8 conversion of the UTF‐32 source. Return 0 on success and a non‐zero status otherwise. See the first `utf32ToUtf8` overload in this group for full contract details. == Return Value 0 on success and a non‐zero status otherwise == Parameters [cols="1,4"] |=== | Name| Description | *dstVector* | destination for the null‐terminated UTF‐8 result | *srcString* | null‐terminated UTF‐32 source string to convert | *numCodePointsWritten* | if non‐null, receives the number of UTF‐8 code points written | *errorByte* | optional substitute for invalid UTF‐32 values; 0 writes nothing | *byteOrder* | byte order of the UTF‐32 input (host by default) |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#