Embarcadero disabled access to byte stings in Delphi XE5 Firemonkey and if you’re a long time Delphi developer you may be missing them. They are also useful if you are bringing old code forward to use on mobile devices. Andreas Hausladen has a blog post with a solution for you. Apparently byte strings are still there in System.pas they are just renamed. Andreas provides a hex edited unit called System.ByteStrings.dcu which you can add to your project and uses clause providing you access to byte strings. The string types it enables are:
ShortString
AnsiString
AnsiChar
PAnsiChar
PPAnsiChar
UTF8String
PUTF8String
RawByteString
PRawByteString
The unit has only been downloaded from his site a few hundred times so I know a lot of you don’t have it yet.
Update: There is now support for Delphi XE6 as well.
5 Comments