[DUG] [computing] ]XE2 string conversion notes

Peter Ingham ping_delphilist at 3days.co.nz
Fri Jan 20 17:20:56 NZDT 2012


There are several other things to be aware of.

Code using Move, FillChar or pointers into strings (PChars) & the like 
needs to be checked with care.  Move (s[1], x, Length(s)) won't work as 
expected.

Array [xx] of BYTE and Array [xx] of Char are no longer equivalent - 
I've found many cases where code assumed they are.

FillChar under D2009+ is badly misnamed as it really does a FillByte.


Truely correct handling of Unicode involves more than just assuming 
Characters are now 2 Bytes and strings are arrays of Chars (Issue of 
Codepoints vs Displayable characters).

Bob Swart has good coverage of Unicode conversions in chapter 6 of his 
e-Book "Delphi 2009 Development Essentials' & I know Cary Jensen has 
also produced material on the topic.

Regards


More information about the Delphi mailing list