[Lazarus] String vs WideString

Juha Manninen juha.manninen62 at gmail.com
Wed Aug 16 10:59:20 CEST 2017


On Wed, Aug 16, 2017 at 8:53 AM, Bo Berglund via Lazarus
<lazarus at lists.lazarus-ide.org> wrote:
> Based on this experience I wanted to alert the OP of the fact that
> using AnsiString instead of string is not a cure-all for binary data,
> you need to fix the codepage too, which is what the RawByteString does
> for you....

Bo, everybody has known for decades that AnsiString is not for binary data.
Why do you proclaim it as a new discovery?
The OP's problem was completely different. It was about text encoding.
TBytes is clearly the right choice for your binary data, but this
discussion is not about binary data!

What means "AnsiString instead of string"?
String is typically an alias for AnsiString.

Your sentence about RawByteString is also wrong.
There is no automatic codepage conversion for RawByteString.

Juha


More information about the Lazarus mailing list