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

This `struct` provides a namespace for a suite of pure procedures to convert character buffers between UTF&hyphen;8 and UCS&hyphen;2&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
struct CharConvertUcs2;
----

== Description

UCS&hyphen;2 conversions are performed to&sol;from the full `2 &circ; 16` bit space (the &quot;UTF&hyphen;16&quot; hole U&plus;D800&hyphen;U&plus;DFFF is not treated as a special case)&period; Note that all C&hyphen;style routines in this component honor _strlcpy_ semantics, meaning that all returned C&hyphen;style strings will be null&hyphen;terminated as long as the return buffer size is positive (i&period;e&period;, `dstCapacity &gt; 0`)&period; Note that since all UCS&hyphen;2 operations take place as `unsigned short`s, byte order is not taken into consideration, and Byte Order Mark (BOM) characters are not generated&period; If a BOM is present in the input, it will be translated into the output&period;

== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlde/CharConvertUcs2/ucs2ToUtf8-00.adoc[`ucs2ToUtf8`] 
| `ucs2ToUtf8` overloads
| xref:BloombergLP/bdlde/CharConvertUcs2/utf8ToUcs2-0dd.adoc[`utf8ToUcs2`] 
| `utf8ToUcs2` overloads
|===



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