<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
Not 100% on this but I think the gist is that UnicodeString is compatible with AnsiString and a conversion is done on assignment.<span id="ms-outlook-android-cursor"></span><br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
<span id="OutlookSignature">
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
--<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
Alexander Grotewohl<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
<a href="https://dcclost.com">https://dcclost.com</a></div>
</span><br>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> fpc-pascal <fpc-pascal-bounces@lists.freepascal.org> on behalf of Ryan Joseph via fpc-pascal <fpc-pascal@lists.freepascal.org><br>
<b>Sent:</b> Tuesday, October 6, 2020 12:39:43 PM<br>
<b>To:</b> FPC-Pascal users discussions <fpc-pascal@lists.freepascal.org><br>
<b>Cc:</b> Ryan Joseph <genericptr@gmail.com><br>
<b>Subject:</b> Re: [fpc-pascal] Adding file to string to the RTL</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText"><br>
<br>
> On Oct 6, 2020, at 2:12 AM, Michael Van Canneyt via fpc-pascal <fpc-pascal@lists.freepascal.org> wrote:<br>
> <br>
> I added the following functions to the sysutils unit (rev 47056):<br>
<br>
Great, thanks Michael.<br>
<br>
I've always used AnsiString so why is UnicodeString preferable here?<br>
<br>
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?).<br>
<br>
Regards,<br>
Ryan Joseph<br>
<br>
_______________________________________________<br>
fpc-pascal maillist - fpc-pascal@lists.freepascal.org<br>
<a href="https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal">https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal</a><br>
</div>
</span></font></div>
</body>
</html>