On Mon, Apr 9, 2012 at 9:19 AM, Felipe Monteiro de Carvalho <[email protected]> wrote: > > On Mon, Apr 9, 2012 at 2:04 PM, Marcos Douglas <[email protected]> wrote: > > Ops... you're right. > > I was confused because IncludeTrailingPathDelimiter is part of RTL and > > it not works with UTF8. The code uses Length and Result[l]... so, I > > thought this is would be problem. > > Some routines made for Ansi work automatically with UTF-8 without > changes. Simply using Length and Result[] by itself might sometimes be > correct, if those are ment to access only chars <= #$7F like #10 and > #13 are.
Lenght function do not works with UTF8 correctly. procedure TForm1.Button1Click(Sender: TObject); begin Edit1.Text := 'ábç'; ShowMessage(IntToStr(Length(Edit1.Text))); end; The result is 5 not 3, but you did know this of course. Marcos Douglas -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
