[fpc-devel] Encoded AnsiString

Michael Van Canneyt michael at freepascal.org
Tue Jan 7 13:24:57 CET 2014

On Tue, 7 Jan 2014, Michael Schnell wrote:

> On 01/07/2014 01:05 PM, Michael Van Canneyt wrote:
>> This is a mistake. You should use TByteArray for that. "Old" pre-unicode 
>> Delphi also handles this type.
> Of course I do know that this sometimes is recommended, but (with pre-Unicode 
> Delphi) I don't see any point in not using "String", which is a lot more 
> handy providing easy to use concatenation, search operation, etc.
> With a new string type this would come for free, as it requires the same 
> behavior as the "locale based 1 Byte ANSI String" encoding variant, which is 
> necessary to be supported anyway.
> Thus, IMHO, a discussion about TByteArray is pointless


But like I said: 
Do not expect us to adapt the RTL to suit any inappropriate use of strings.


More information about the fpc-devel mailing list