UnicodeToUTF8Inline function
Encodes the given code point as an UTF-8 sequence of 1 to 4 bytes.
Declaration
function UnicodeToUTF8Inline(CodePoint: Cardinal; Buf: PChar): IntegerArguments
CodePoint | Unicode character value to convert. |
Buf | Destination where encoded byte values are stored. |
Function result
Number of bytes required for the UTF-8-encoded value.
Description
UnicodeToUTF8Inline is an
Integer function used to
convert the Unicode character value in
CodePoint to the sequence
of bytes needed for the UTF-8 encoding. UnicodeToUTF8Inline stores the
UTF-8-encoded byte values for the Unicode character in the
Buf
parameter.
The return value contains the number of bytes required for the UTF-8-encoded value (in the range 1..4).
Used in the implementation of UnicodeToUTF8 and
UnicodeToUTF8SkipErrors.
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
