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 <[email protected]> on behalf of Ryan Joseph via fpc-pascal <[email protected]> Sent: Tuesday, October 6, 2020 12:39:43 PM To: FPC-Pascal users discussions <[email protected]> Cc: Ryan Joseph <[email protected]> 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 > <[email protected]> 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 - [email protected] https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
_______________________________________________ fpc-pascal maillist - [email protected] https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
