[Lazarus] UTF8Tools problem

Juha Manninen juha.manninen62 at gmail.com
Sat Sep 30 09:27:02 CEST 2017


On Sat, Sep 30, 2017 at 3:59 AM, Vojtěch Čihák via Lazarus
<lazarus at lists.lazarus-ide.org> wrote:
> unicodeinfo.pas(1180,53) Error: Wrong number of parameters specified for
> call to "UnicodeToUtf8"
>
> Error: Found declaration: UnicodeToUtf8(PChar;PUnicodeChar;Int64):Int64;

I downloaded UTF8tools from the wiki page and compiled it without problems.
I don't see UnicodeToUtf8 with 3 parameters anywhere. LazUTF8 has 2 versions:
 function UnicodeToUTF8(CodePoint: cardinal): string; // UTF32 to UTF8
 function UnicodeToUTF8(CodePoint: cardinal; Buf: PChar): integer; //
UTF32 to UTF8

> Question is: How can I repair unicodeinfo.pas?

unicodeinfo.pas looks OK. You have another version of UnicodeToUtf8()
coming from somewhere.

> Or better, can I do the same job without UTF8Tools package?

Unit LazUnicode has iterators for both codepoints and Unicode "characters".

Juha


More information about the Lazarus mailing list