31.03.2016 1:48, Bart пишет:
On 3/31/16, Graeme Geldenhuys <mailingli...@geldenhuys.co.uk> wrote:

[~]$ echo $LANG
en_GB.UTF-8

This is what I hink is happening to your test (Sven can probably
explain it better):

Since your locale is UTF8, CP_ACPand CP_UTF8 refer to the same
codepage, therefor the contents of S1 in either case is correct.

Without the codepage identifiier on Windows, after the assignement S1
contains a UTF8 byte-sequence, but the compiler treats it as CP_ACP,
and therefor on my system as codepage 1252, and now the string has a
completely different meaning.

Lazarus switches DefaultSystemCodePage to 65001, so your example works OK here without codepage directive (when inserted into LCL dependent project, of course).

--
Best regards,
 Maxim Ganetsky                  mailto:gan...@narod.ru

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to