[fpc-devel] String and UnicodeString and UTF8String
Marco van de Voort
marcov at stack.nl
Wed Jan 12 22:40:15 CET 2011
In our previous episode, Sven Barth said:
> > legacy code can be broken by (eventually) required changes to "set of
> > char", sizeof(char) and PChar, sizeof(string) as opposed to
> > Length(string), upper/lower conversion, and many more not so obvious
> > consequences.
>
> I don't believe that PChar will be touched, because to much code that
> interfaces with C code depends on that. Although its declaration might
> not be the same then and become "PChar = PAnsiChar" instead of "PChar =
> ^Char" if Char is changed (currently its "PAnsiChar = PChar").
Current Delphi _does_ regard char as equivalent lowlevel type to string. So
whatever you choose as string (8 or 16-bit), pchar will match it by changing
to pansichar or pwidechar
More information about the fpc-devel
mailing list