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

John jszcmpr at netspace.net.au
Tue Feb 22 11:08:25 CET 2011


On 22/02/2011 5:11 PM, Jürgen Hestermann wrote:
> > I don't need Unicode support, and I DON'T want to have to worry 
> about its complexities. > Just leave a compiler mode or switch that 
> lets me keep "string"  as LongString and I will be
> > happy, whatever happens with unicode. And, as far as I understand, 
> you can still set
> > string = shortstring with a compiler switch, so leaving a compiler 
> switch for unicode strings
> > would be "just like it did from ShortString to LongString".
>
> But why are you using the generic "string" type at all? If you want to 
> make sure that you use AnsiString or ShortString or whatever then use 
> it directly. That way you have full control about the string type used.
Probably because that was the "normal" way of doing it, since ansi/long 
string was added to Dephi a *long* time ago.  Also simply less typing, 
more readable if I always know that a string is just a string.  Sure, if 
you are doing lots of stuff with multiple string types, it makes good 
sense to be specific.  I am not.  (If I am fussed about what sort of 
integer I have, I will work it out and declare it properly.  If I just 
want a counter, I will just use "integer").

I suppose if the ansistring type remains, I can do a global replace on 
ALL my code, or redeclare string as ansistring, or something, but I 
don't see why there should not be a compiler switch to do it, seeing 
that that was the way the last string divergence was handled.  What I 
was really afraid of was that Graeme had declared ansistring to be 
surplus to his needs, and that therefore there was no need for it to exist.

John Sunderland






More information about the Lazarus mailing list