[Overview][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'LazUTF8' (#lazutils)

UnicodeToUTF8SkipErrors

Stores a single Unicode codepoint as a UTF-8-encoded value in the buffer.

Declaration

Source position: lazutf8.pas line 92

function UnicodeToUTF8SkipErrors(

  CodePoint: Cardinal;

  Buf: PChar

):Integer;

Arguments

CodePoint

  

Codepoint (Unicode character) to convert in the function.

Buf

  

Buffer where the converted value is stored.

Function result

UTF-8-encoded value for the codepoint.

Description

UnicodeToUTF8SkipErrors is a simple and fast function used to write a single Unicode codepoint as a UTF-8-encoded value in Buf. It returns the number of bytes written. It does not append a terminating null (#0) character. It does not check if the codepoint actually exists in Unicode tables. It returns 0 if the codepoint can not be represented as a 1 to 4 byte UTF-8 sequence.


Version 3.2 Generated 2024-02-25 Home