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

Jürgen Hestermann juergen.hestermann at gmx.de
Sat Aug 18 16:15:04 CEST 2012

The few things I know about are:

Am 2012-08-18 15:54, schrieb Graeme Geldenhuys:
> 1) Is it correct that String <> AnsiString any more?

Well, it never was. At least "string" could also be a shortstring, maybe other strings too meanwhile (I don't know).

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

I don't know what a Delphi unicode-type string is exactly.

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

AFAIK UTF-8 is the prefered unicode string as it is used in the IDE and also many libraries (but not all). I am not sure what is planed for the future though.

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

The RTL still uses the ancient 255 char one-byte array.
This works ok if paths are not longer than 255 chars and
when you convert all strings to the (one-byte) string type
that is used by the API of the OS (ANSI for Windows and I think UTF-8 for Linux).

More information about the fpc-pascal mailing list