[#BloombergLP-bdlde-CharConvertUtf16] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlde.adoc[bdlde]::CharConvertUtf16 :relfileprefix: ../../ :mrdocs: This `struct` provides a namespace for a suite of static functions to convert buffers or containers between UTF‐8 and UTF‐16. Note that Byte Order Mark (BOM) sequences are neither generated nor recognized as special. If a BOM is present in the input, it will be translated, whether correct (`0xfeff`) or incorrect (`0xfffe`), into the output without any special handling. == Synopsis Declared in `<bdlde_charconvertutf16.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct CharConvertUtf16; ---- == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlde/CharConvertUtf16/computeRequiredUtf16Words.adoc[`computeRequiredUtf16Words`] | Return the number of words required to store the translation of the specified UTF‐8 string `srcBuffer` into a 0 terminated UTF‐16 string (including the 0 terminating word into the returned count). Optionally specify `endPtr`, referring to one past the last input character. If `endPtr` is not supplied, or is 0, treat `srcBuffer` as 0 terminated. Note that this function will return the size `utf8ToUtf16` will require, assuming the `errorWord` argument to `utf8ToUtf16` is non‐zero. | xref:BloombergLP/bdlde/CharConvertUtf16/computeRequiredUtf8Bytes-08.adoc[`computeRequiredUtf8Bytes`] | `computeRequiredUtf8Bytes` overloads | xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0bf.adoc[`utf16ToUtf8`] | `utf16ToUtf8` overloads | xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-014.adoc[`utf8ToUtf16`] | `utf8ToUtf16` overloads |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#