[Lazarus] Ord of a UTF8 char

Antônio antoniog12345 at gmail.com
Sat Mar 27 21:42:34 CET 2010


How do I return the character value from a unicode table value?

Antônio

2010/3/27 Mattias Gaertner <nc-gaertnma at netcologne.de>:
> On Sat, 27 Mar 2010 15:24:45 -0300
> Antônio <antoniog12345 at gmail.com> wrote:
>
>> For example:
>>
>> var
>>   i :integer;
>>   s :utf8string;
>> begin
>>   for i := 0 to utf8klength(s) do
>>   begin
>>
>>      // What the meaning of s[i] at this position?
>
> Makes no sense.
> s[i] is the i-th byte of the string. In UTF8 one character can have one
> to four bytes.
>
>
>>   end;
>> end;
>
> Maybe this helps:
>
> http://wiki.lazarus.freepascal.org/LCL_Unicode_Support
>
>
> Mattias
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>




More information about the Lazarus mailing list