[fpc-pascal] Setting string to be UnicodeString by default

OBones obones at free.fr
Tue May 15 15:19:21 CEST 2012

Marcos Douglas wrote:
> On Tue, May 15, 2012 at 6:16 AM, Jonas Maebe<jonas.maebe at elis.ugent.be>  wrote:
>> Mattias Gaertner wrote on Tue, 15 May 2012:
>>> On Tue, 15 May 2012 10:43:19 +0200
>>> Jonas Maebe<jonas.maebe at elis.ugent.be>  wrote:
>>>> It is not possible in FPC 2.6.x. Wth the svn trunk version, you can
>>>> use {$modeswitch unicodestrings} (in combination with {$h+}), or even
>>>> better {$mode delphiunicode} (which also enable other modeswitches
>>>> that have been implemented for Delphi2009+ compatibility).
>>> Is this new mode only a temporary experiment or will it stay?
>> It will stay afaik, although the effects may still change to better match
>> Delphi2009+ compatibility if required.
> I would like to understand why Delphi compatibility is so important to
> FPC and Lazarus.

In my case, I'm generating a DLL on the fly with FPC, a Dll that 
interfaces with Delphi XE2 and that is based on code written by the 
software users.
Those users don't care that UnicodeString should be used, they only know 
of string and don't want to change all their scripts because we moved to 
a unicode version of Delphi. Hence the need to follow what Delphi has 
done and change string to be unicodestring.
I'm not saying it is a good or bad thing, I don't want to start a debate 
here, I just want to say that I'd prefer if I wouldn't have to reparse 
my users code to replace "string" with "UnicodeString" just before 

More information about the fpc-pascal mailing list