[Overview][Procedures and functions][Index] Reference for unit 'LazUTF16' (#lazutils)

UnicodeToUTF16

Converts a Unicode character (code point) to its UTF-16 equivalent as a UnicodeString type.

Declaration

Source position: lazutf16.pas line 45

function UnicodeToUTF16(

  u: Cardinal

):UnicodeString;

Arguments

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.


Version 4.0 Generated 2025-05-03 Home