On Mon, Apr 09, 2012 at 09:37:16AM -0300, Marcos Douglas wrote: > 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.
Both are valid results. The first is needed when you copy the string (bytes to move) the second to display the string (since it will probably be around 3 glyphs (yes, I know that is not guaranteed)) -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
