[fpc-devel] new string - question on usage

Sven Barth pascaldragon at googlemail.com
Wed Oct 12 14:17:36 CEST 2011


Am 12.10.2011 14:16, schrieb Sven Barth:
> Am 12.10.2011 14:16, schrieb Michael Schnell:
>> On 10/12/2011 12:13 PM, Hans-Peter Diettrich wrote:
>>>
>>> Delphi allows for RawByteStrings with encoding 0. When assigned to an
>>> AnsiString, the string encoding still is zero, both variables seem to
>>> point to the same string data.
>>
>> The pointing to the data array (managed by "lazy copy and reference
>> counting features) is independent from the encoding ID, that is part of
>> the string management record and not of the data array.
>
> Wrong. Both reference counting and code page are part of the management
> record. See here line 38:
> http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/rtl/inc/astrings.inc?revision=19444&view=markup

Or did I misunderstand you?

Regards,
Sven




More information about the fpc-devel mailing list