[fpc-pascal] Adding file to string to the RTL
Alexander Grotewohl
alex at dcclost.com
Tue Oct 6 18:51:35 CEST 2020
Not 100% on this but I think the gist is that UnicodeString is compatible with AnsiString and a conversion is done on assignment.
--
Alexander Grotewohl
https://dcclost.com
________________________________
From: fpc-pascal <fpc-pascal-bounces at lists.freepascal.org> on behalf of Ryan Joseph via fpc-pascal <fpc-pascal at lists.freepascal.org>
Sent: Tuesday, October 6, 2020 12:39:43 PM
To: FPC-Pascal users discussions <fpc-pascal at lists.freepascal.org>
Cc: Ryan Joseph <genericptr at gmail.com>
Subject: Re: [fpc-pascal] Adding file to string to the RTL
> On Oct 6, 2020, at 2:12 AM, Michael Van Canneyt via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
>
> I added the following functions to the sysutils unit (rev 47056):
Great, thanks Michael.
I've always used AnsiString so why is UnicodeString preferable here?
So is the idea we need to specify an UTF-8 encoding for unicode otherwise it assumes ASCII format? I didn't specify the encoding with TStringList and I always seemed to get back what I wanted (maybe it sniffed the encoding from the file?).
Regards,
Ryan Joseph
_______________________________________________
fpc-pascal maillist - fpc-pascal at lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20201006/8e595dd3/attachment.htm>
More information about the fpc-pascal
mailing list