[fpc-devel] Unicode support (again)

Daniël Mantione daniel.mantione at freepascal.org
Tue Nov 11 10:56:00 CET 2008



Op Tue, 11 Nov 2008, schreef Michael Schnell:

>
>> Surely this is allowed and works correctly under D2009, otherwise I
>> really misunderstood Unicode support in D2009.
>> 
> In D2009, "String" is WideString, and the VCL API is done with this 
> (Wide)String. So this of course works. With Lazarus things are more complex, 
> as they need to support a lot of environments for the LCL. Even small 
> embedded environments need to be taken into account, so generally using 
> WideString is not a good idea.
>
> I feel that this is why FPC should be configurable to have "String" be either 
> of ANSIString, UTF8String or WideString, and WideString to be configurable to 
> be either of UTF16String or UCS2String, while of course all these types 
> always do exist with their proper names and conversion between them is 
> automatically done as needed.

There will have full compatibility with old code. It quite likely FPC will 
have a Win32 platform where string=ansistring and a WinNT platform where 
string=unicodestring. Other platforms will be decided on a case by case 
basis, i.e. there is little point in having string=unicodestring on Dos.

Daniël


More information about the fpc-devel mailing list