On 06/26/2013 09:41 AM, Michael Schnell wrote:

It shows ... how it is done.


Hi DoDi,

You might be inclined to enhance the test program for me and compile it with DXE:

AFAI understand the encoding type and as I see in http://wiki.freepascal.org/FPC_Unicode_support :

========================================================
type
  TRefStringRec=  packed  record
    Encoding:  word;     // encoding of string
    ElementSize:  byte;  // size in bytes of string's element (1-4)
    Ref:  SizeInt;       // number of references
    Len:  SizeInt;       // number of elements is string
  end;
========================================================

(In fact I suppose that a dummy byte is inserted to prevent that the SizeInt 
types are misaligned)

The encoding type information should be just before the ref counter and thus 
adding something like


 v1 := PInteger(j1-12);
 v2 := PInteger(j2-12);

And printing this in hex should show this information.

Now you could test in the newest DXE version what happens when assigning a 
normal string to a RawByteString and vice versa.

Thanks for helping out...
-Michael

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to