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

Sergei Gorelkin sergei_gorelkin at mail.ru
Wed Feb 16 09:21:51 CET 2011


Graeme Geldenhuys пишет:
> Op 2011-02-15 17:38, Sven Barth het geskryf:
>> In Delphi such strings with codepage need to be defined with "type" and
>> thus they are different types (not compatible regarding "var").
> 
> 
> Lets hope FPC doesn't take that stupid Delphi idea to implementation. A
> UnicodeString with a different encoding bit set is still a UnicodeString
> type.
> 
> Thanks though for testing and letting us know what Delphi does.
> 
It's not as stupid as it may seem. When a string being passed to a function is empty, it is actually 
a nil pointer, and its encoding cannot be determined at runtime. Fine for value parameters, but for 
var/out parameters the caller must know what data to assign. Making each encoding a distinct type 
and having compiler do the checks is probably the only way out.

Sergei




More information about the Lazarus mailing list