UnicodeToUTF16 function
Converts a Unicode character (code point) to its UTF-16 equivalent as a UnicodeString type.
Declaration
function UnicodeToUTF16(u: Cardinal): UnicodeStringArguments
u | Cardinal value with the UTF-16 code point converted in the routine. |
Function result
UnicodeString value for the specified UTF-16 code point.
Description
Cardinal values below $10000 result in a single WideChar value for the code point. Cardinal values in the range $D800 - $DFFF are reserved code points and contain 2 WideChar values in the result to represent the UTF-16 code point. WIdeChar values are cast to the UnicodeString type used in the return value.
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
