diff --git a/components/lazutils/lazutf8.pas b/components/lazutils/lazutf8.pas index 11bd925c7f..de1d2c589a 100644 --- a/components/lazutils/lazutf8.pas +++ b/components/lazutils/lazutf8.pas @@ -84,10 +84,10 @@ function UTF8LengthFast(p: PChar; ByteCount: PtrInt): PtrInt; // Functions dealing with unicode number U+xxx. function UTF8CharacterToUnicode(p: PChar; out CharLen: integer): Cardinal; -function UnicodeToUTF8(CodePoint: cardinal): string; -function UnicodeToUTF8(CodePoint: cardinal; Buf: PChar): integer; -function UnicodeToUTF8SkipErrors(CodePoint: cardinal; Buf: PChar): integer; -function UnicodeToUTF8Inline(CodePoint: cardinal; Buf: PChar): integer; inline; +function UnicodeToUTF8(CodePoint: cardinal): string; // UTF32 to UTF8 +function UnicodeToUTF8(CodePoint: cardinal; Buf: PChar): integer; // UTF32 to UTF8 +function UnicodeToUTF8SkipErrors(CodePoint: cardinal; Buf: PChar): integer; // UTF32 to UTF8 +function UnicodeToUTF8Inline(CodePoint: cardinal; Buf: PChar): integer; inline; // UTF32 to UTF8 function UTF8ToDoubleByteString(const s: string): string; function UTF8ToDoubleByte(UTF8Str: PChar; Len: PtrInt; DBStr: PByte): PtrInt; function UTF8FindNearestCharStart(UTF8Str: PChar; Len: SizeInt; diff --git a/docs/xml/lazutils/lazutf8.xml b/docs/xml/lazutils/lazutf8.xml index cbc87065c0..6cbb9d28b2 100644 --- a/docs/xml/lazutils/lazutf8.xml +++ b/docs/xml/lazutils/lazutf8.xml @@ -144,8 +144,9 @@ For speed reasons this function only checks for 1,2,3,4 byte encoding errors. Es - Encodes the given codepoint as an UTF-8 sequence of 1 to 4 bytes. - It does not add a #0. + Encodes the given code point as an UTF-8 sequence of 1 to 4 bytes. + It does not add a #0. +The code point is not encoded, aka in UTF32.