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

UnicodeToUTF8SkipErrors

Simple and fast function to write a single unicode codepoint as UTF-8 to Buf and returns the number of bytes written

Declaration

Source position: lazutf8.pas line 92

function UnicodeToUTF8SkipErrors(

  CodePoint: Cardinal;

  Buf: PChar

):Integer;

Description

It does not append a #0. It does not check if it is 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.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.