[fpc-devel] new string - question on usage

Sven Barth pascaldragon at googlemail.com
Wed Oct 12 10:35:36 CEST 2011


Am 12.10.2011 10:24, schrieb Michael Schnell:
> On 10/12/2011 10:09 AM, Paul Ishenin wrote:
>> 12.10.2011 16:03, Michael Schnell wrote:
>>> I suppose a variable of the type "String" is pre-loaded with the
>>> predefined "System" encoding ID.
>>
>> If you mean "AnsiString" then it is loaded with encoding 0 which means
>> default system codepage. It will get the real encoding number after
>> the first assignment.
>>
> I understand that some day (when the official release comes up) "String"
> will be a new String type and thus ANSIString obsolete and just an alias.

No. In Delphi "String = UnicodeString", but AnsiString still exists as a 
one-byte (or multi-byte) string type (the "new string type" or "code 
page aware string type").

Regards,
Sven




More information about the fpc-devel mailing list