On Wed, Mar 30, 2016 at 3:12 PM, Michael W. Vogel <m-w-vo...@gmx.de> wrote: >> The cases fail with UTF-8 file encoding. > I don't understand this.
I meant that some cases fail even when the file encoding is UTF-8. File encoding is not the issue. >> http://wiki.freepascal.org/Better_Unicode_Support_in_Lazarus#String_Literals > > And the first example there is wrong (or the words "and without" need to be > removed). With no defined codepage > const s: string = 'äöü'; > has codepoints of a UTF-8 String, the codepage is 0. If you assign it to a > string with a declared codepage, you get a corrupted string. See my example. I editor the page and separated 2 cases: const s = 'äöü'; and const s: string = 'äöü'; Please check. In a forum discussion it turned out they behave differently. It may even be a compiler bug. I cannot test it right now. Could you please edit the page as needed. Anyway, how often do you need to assign a constant to a string that has an explicitly declared codepage? Juha -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus