[fpc-devel] String and UnicodeString and UTF8String

Sven Barth pascaldragon at googlemail.com
Thu Jan 13 21:33:56 CET 2011


On 12.01.2011 22:40, Marco van de Voort wrote:
> 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

Oh come on -.-

There are some days on which I really dislike the developers of Delphi...

Regards,
Sven



More information about the fpc-devel mailing list