[fpc-devel] The (near) future of strings

Michael Van Canneyt michael at freepascal.org
Mon Mar 7 14:49:56 CET 2016



On Mon, 7 Mar 2016, Mattias Gaertner wrote:

> On Thu, 03 Mar 2016 06:35:35 +0000
> Alfred <alfred at consulab.nl> wrote:
>
>> [...]
>> In the (near) future, I am still a very happy user of FPC. And mORMot.
>> And sometimes some version of Delphi > XE2.
>> Lets say its 2017. And I am using FPC 3.2.0. Or FPC 4.0.
>>
>> What mode will I be using when writing programs/frameworks for both
>> Delphi and FPC ?
>> * is -Mdelphiunicode the way to go ?
>
> The -Mdelphiunicode is the first step towards Delphi XE compatibility.
> The next step is to provide a compatible UTF-16 UnicodeString RTL/FCL
> and then third party packages like the LCL can be adapted. This would
> be the most compatible solution. I don't know who is working on the
> UTF-16 RTL/FCL.

No-one. 
Jonas made sure that all OS System interfaces can be done with both 
Ansi and Widestring. That's it.

The problem starts with classes. 
Methods could be overloaded, that is not a problem (except lots of
duplicated code).

But is impossible to have TComponent.Name have type AnsiString and UnicodeString
at the same time. Same for all other string properties, and TStrings in particular.

Michael.



More information about the fpc-devel mailing list