Sign in Join
FPDoc Onlineexperiment

TCharacter.ConvertFromUtf32 function

Member of TCharacterpublicIn unit Character

Convert a UTF32 character to UnicodeString.

Declaration

pascal
class function ConvertFromUtf32(AChar: UCS4Char): UnicodeString
 ; static

Arguments

AChar

UTF32 character to convert to UTF16.

Function result

A UTF16 Unicode string representing AChar.

Description

TCharacter.ConvertFromUtf32 converts a single UTF32 character AChar to a UTF16 string. This is the opposite of ConvertToUtf32.

The result is a string, since multiple UTF16 characters can be needed to encode a single UTF32 character.

Errors

If AChar is not in the valid range of UTF32 characters, an EArgumentOutOfRangeException exception is raised.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.