<p>Am 05.05.2017 15:55 schrieb "Michael Van Canneyt" <<a href="mailto:michael@freepascal.org">michael@freepascal.org</a>>:<br>
><br>
><br>
><br>
> On Fri, 5 May 2017, Mattias Gaertner wrote:<br>
><br>
>> On Fri, 5 May 2017 14:30:32 +0200 (CEST)<br>
>> Michael Van Canneyt <<a href="mailto:michael@freepascal.org">michael@freepascal.org</a>> wrote:<br>
>><br>
>>> [...]<br>
>>> > AFAIK FPC stores UTF-8 string literals (-Fcutf8) as widestrings<br>
>>> > instead of UTF8String. Please correct me if I'm wrong.<br>
><br>
><br>
> To make sure I was presenting correct facts, I did some tests.<br>
><br>
> As a result of the tests, I think the above statement is wrong.</p>
<p>In all three cases you are either explicitly or implicitly forcing the compiler to convert it to Ansi/UTF-8 and since it's a constant it takes a compiletime shortcut.<br>
If you'd do a Writeln without the typecast then it will be a UTF-16 constant that is stored in the binary *if* the string contains a character > $7F.</p>
<p>Regards,<br>
Sven</p>