[fpc-pascal] FPC vs Delphi's unicode string support questions

Graeme Geldenhuys graemeg.lists at gmail.com
Sat Aug 18 15:54:34 CEST 2012


In the tiOPF project the v3 branch is a Delphi Unicode String enabled 
version of tiOPF, thus it only supports Delphi 2009/2010 and newer. A 
while back I had some discussion with Michael van Canneyt, and he 
believes FPC is sufficiently compatible to Delphi 2010 and later, so the 
tiOPF3 port should be possible.

So today I started taking a look to see what would be involved in 
getting tiOPF3 compatible with FPC. Off the bat, I have a lot of 
compiler errors with latest FPC 2.7.1 but I'll push ahead and see how 
far I get.

I haven't been following the latest 2.7.1 development in detail, so I 
have a couple of questions... all relating to FPC 2.7.1 (trunk) only:

0) Am I jumping the gun here, and FPC is not nearly compatible enough to 
port a Delphi 2010, XE, XE2 project to FPC 2.7.1?

1) Is it correct that String <> AnsiString any more?

2) If true, what is String an alias of?  UnicodeString, WideString, 
something else?

3) If false, what must I enable/toggle to say that String must now be a 
Delphi unicode-type string.

4) What Unicode encoding is used? UTF-8 or UTF-16?

5) Is it only the compiler that has unicode string type support. Has 
anything been done or started in the RTL?

   - Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal

More information about the fpc-pascal mailing list