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

Marco van de Voort marcov at stack.nl
Sat Aug 18 16:05:09 CEST 2012


In our previous episode, Graeme Geldenhuys said:
> 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?

If it relies heavily on unicodestring, IMHO yes. 

My guess is that you mistook a comment that confirmed the base
implementation of the variable stringtype to be compatible for a
confirmation that the whole project is ready.
 
> 2) If true, what is String an alias of?  UnicodeString, WideString, 
> something else?

ansistring or shortstring, depending on {$H+}. What to do with the D2009+
change in this regard has been discussed, but opinions varied.

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

As said, undecided.

If I had to guess, it will end up D2009 compatible (UTF16 everywhere),
causing a similar compatibility break as Delphi somewhere.
 
> 5) Is it only the compiler that has unicode string type support. Has 
> anything been done or started in the RTL?

The helpers for the types have been done mostly. Nothing else.



More information about the fpc-pascal mailing list