[Lazarus] Ord of a UTF8 char
Mattias Gaertner
nc-gaertnma at netcologne.de
Sat Mar 27 20:14:07 CET 2010
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
More information about the Lazarus
mailing list