[fpc-devel] Encoded AnsiString
Michael Van Canneyt
michael at freepascal.org
Tue Jan 7 13:05:28 CET 2014
On Tue, 7 Jan 2014, Michael Schnell wrote:
> On 01/07/2014 12:27 PM, Michael Van Canneyt wrote:
>>
>> if you have use-case 1 (which I doubt, since it is not possible even today)
>> then you're better off using unicodestring anyway.
>
> My argumentation is driven by the experience (some myself, a huge lot by my
> colleagues) with doing "embedded" M2M-communication projects with multiple
> protocols and applications (included in the project and/or predefined by
> customers) and with some programs requiring sophisticated user interaction in
> multiple languages.
>
> The projects originally were done (mine still are done) using old pre-Unicode
> Delphi.
>
> Here, strings are used as well to handle texts as to handle byte streams
> (that might contain binary data or might contain text in whatever encoding).
This is a mistake. You should use TByteArray for that.
"Old" pre-unicode Delphi also handles this type.
You cannot expect us to take into account your improper use of single-byte strings
when designing a RTL.
You'll just have to see whether rawbytestring does what you need...
Michael.
More information about the fpc-devel
mailing list