[Lazarus] Can't compile trunk with fpc 2.4.5 under ubuntu

Sven Barth pascaldragon at googlemail.com
Tue Feb 28 14:43:32 CET 2012


Am 28.02.2012 14:36, schrieb Michael Schnell:
> On 02/28/2012 02:24 PM, Sven Barth wrote:
>> This might be, but this shows that we do not need to extend the
>> compiler with yet another managed type when all we need is already
>> available.
>
> Of course you are quite right, but before the Unicode transition this
> was available out of the box as "String" and used in multiple projects,
> but after the Unicode this is not so sure.
 >
> ANSIString supposedly still can be used, but to me the name "String"
> _sounded_ as if no encoding is necessary to be taken into account, and
> thus simply storing Bytes is not a bad idea, while ANSIString sounds as
> if the encoding has to be ANSI and this is essential for the internal
> proceedings. I do know that the contrary is true: "ANSISting" can
> happily be used for everything while in Delphi XE "String" imposes one
> of several encoding schemes. To me this naming is extremely ambiguous.

Before Delphi 2009 you might have been right, but with that version 
Embarcadero did a cut and we now need to adapt and live with that. Also 
String in Delphi 2009+ is a UnicodeString, so it has only one encoding.

And with the way I described we can at least provide a type that handles 
similar to good old AnsiString, but will continue to work even if String 
should be changed to UnicodeString in the future.

Regards,
Sven




More information about the Lazarus mailing list