> This is a bit counter intuitive to me.
It is explained here:
https://wiki.freepascal.org/Unicode_Support_in_Lazarus
IMO "c4" case (c4: String1250 = 'áéíóčž';) is not fully explained.
Probably what here happens is, that declared code page of c4 = source
file code page and in that case compiler does not insert conversion
code. StringCodePage(c4)=1250 (also StringCodePage(c2)=1250) so dynamic
code page is right, but when assigning to TLabel.Caption current dynamic
code page is not taken into account
For LacaK I recommend using UTF-8 encoding as much as possible. Then
everything "/just works/".
yes I use this, but I have "one" specific case where I want share one
file between Delphi7 and Lazarus
You could have a unit or .inc file with WinCP constants for Delphi7,
and then some IFDEFs. They should be explicitly converted to UTF-8 for
LCL.
UnicodeString constants can also be a good solution. It triggers an
automatic conversion when assigned to a String variable. The
conversion is usually fast enough.
Yes this is what I use (WideString constants) and it is only solution
which works for me in Delphi7/Lazarus
Thanks
L.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal