[fpc-devel] new strings, rawbyte type, but what about "raw" encoding

Martin lazarus at mfriebe.de
Tue Oct 11 03:52:00 CEST 2011


On 11/10/2011 02:46, Marco van de Voort wrote:
> In our previous episode, Martin said:
>> Now my question.
>> Is there (or going to be) an encoding, that is "unknown" and will never
>> be converted. but can be assigned to any of the types?
> Afaik, there is no such thing in Delphi.
>

Slight change in topic:

What encoding does a pchar have? Or rather what does it get, when for 
example assigned to a rawbytestring?

what happens (or is intended to happen), if I cast a string to pchar, 
before handing it over as param?

procedure foo(a: Utf8String);
.....

var s: string;
foo(pchar(s));

or
foo(pchar(@s[2]));





More information about the fpc-devel mailing list