[Lazarus] Does Lazarus support a complete Unicode Component Library?

Jürgen Hestermann juergen.hestermann at gmx.de
Mon Feb 14 19:03:31 CET 2011


Graeme Geldenhuys schrieb:
 > A simple function like:
 >   function CompareText(const S1: UnicodeString;
 >                        const S2: UnicodeString): integer;
 > should be able to work with any UnicodeString parameters (including
 > alias types that have different encoding bits set). So it should work
 > fine for your UTF-8 text, and somebody else's UTF-16 etc. text.

Do you mean that the compiler should convert the strings as needed in 
the background (as between different integer types and/or floats) so 
that you can call ListBox1.Items.Add(x) with x beeing UTF8string or 
UTF16string or...? I am not sure whether this is a good idea because the 
programmer no longer knows how many conversions take place and therefore 
cannot judge the performance impact anymore. On the other hand it would 
make the life easier for beginners.





More information about the Lazarus mailing list