Yes. But UTF8Length() is portable between string encodings? Solution is clean: i must use check ifdef'ed WindowsUnicodeSupport to choice between UTF8Length()/Length(). But maybe it already implemented as universal and conventional solution.
And, that adjanced questuion: Lazarus, guessed, have a tool to recognize encoding by binary representation of string (because Lazarus automatically recognize encodings in LFM files), so, how i can use it ? Graeme Geldenhuys пишет: > You mean like the UTF8Length() function in LCLProc unit? > > Graeme. > > > > On 19/06/2008, Андрей Гусев <[EMAIL PROTECTED]> wrote: > >> Because Length() returns bytes count. >> Have lazarus conventional function to calculate chars count in string, >> that do it independently from its binary representation ? >> "Length() div 2" is not conventional nor portable. >> >> _______________________________________________ >> Lazarus mailing list >> [email protected] >> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus >> >> > > > _______________________________________________ Lazarus mailing list [email protected] http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
