[fpc-devel] Performance of string handling in trunk

Hans-Peter Diettrich DrDiettrich1 at aol.com
Mon Jun 24 16:44:10 CEST 2013


Michael Schnell schrieb:
> On 06/24/2013 12:43 PM, Hans-Peter Diettrich wrote:
>>  I e.g. remember your strange (Delphi incompatible) opinions about 
>> RawByteString and encodings in a startup discussion.
> 
> Yep. As I did not have DTX to try it, I only read what I could find in 
> the internet and supposedly got it wrong.

Yes, still wrong despite earlier explanations :-(

> I hope, now I understand that the type RawByteString ( = String ($FFFF) 
> ) means "codesize = 1 Byte, never to be auto-converted to any 
> differently encoded String type variable.

No. Even if I would like such an encoding, too, Delphi doesn't implement it.

> I seem to understand that DXE does not provide a fully dynamic string 
> type (e.g. to be used as a function parameter taking any String(x) type 
> without auto-conversion. I still do hope that fpc will provide this one 
> day.

This is what RawByteString is for. A RawByteString can have *any* 
encoding, it's kind of a generic AnsiString. Other AnsiStrings have a 
*fixed* encoding, that determines eventually required conversions.

> Moreover I do hope for RawWordString, RawDwordString and RawQWordeString.

Not in Delphi. For binary data TBytes has been added.

DoDi




More information about the fpc-devel mailing list