Am 05.05.2017 15:55 schrieb "Michael Van Canneyt" <mich...@freepascal.org>: > > > > On Fri, 5 May 2017, Mattias Gaertner wrote: > >> On Fri, 5 May 2017 14:30:32 +0200 (CEST) >> Michael Van Canneyt <mich...@freepascal.org> wrote: >> >>> [...] >>> > AFAIK FPC stores UTF-8 string literals (-Fcutf8) as widestrings >>> > instead of UTF8String. Please correct me if I'm wrong. > > > To make sure I was presenting correct facts, I did some tests. > > As a result of the tests, I think the above statement is wrong.
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. 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. Regards, Sven
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel