<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<blockquote type="cite"
cite="mid:CAPN1EhBMepvh1HhXdn38RGhQ5FxTd+10Gkqp6YSA3_aBwLt_sQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr"><br>
> This is a bit counter intuitive to me.<br>
<br>
It is explained here:<br>
<a
href="https://wiki.freepascal.org/Unicode_Support_in_Lazarus"
moz-do-not-send="true">https://wiki.freepascal.org/Unicode_Support_in_Lazarus</a>
<div><br>
</div>
</div>
</blockquote>
<p>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<br>
</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:CAPN1EhBMepvh1HhXdn38RGhQ5FxTd+10Gkqp6YSA3_aBwLt_sQ@mail.gmail.com">
<div dir="ltr">
<div>For LacaK I recommend using UTF-8 encoding as much as
possible. Then everything "<i>just works</i>".</div>
</div>
</blockquote>
<p>yes I use this, but I have "one" specific case where I want share
one file between Delphi7 and Lazarus</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:CAPN1EhBMepvh1HhXdn38RGhQ5FxTd+10Gkqp6YSA3_aBwLt_sQ@mail.gmail.com">
<div dir="ltr">
<div>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.</div>
</div>
</blockquote>
<br>
<blockquote type="cite"
cite="mid:CAPN1EhBMepvh1HhXdn38RGhQ5FxTd+10Gkqp6YSA3_aBwLt_sQ@mail.gmail.com">
<div dir="ltr">
<div>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.</div>
</div>
</blockquote>
<p>Yes this is what I use (WideString constants) and it is only
solution which works for me in Delphi7/Lazarus</p>
<p>Thanks<br>
</p>
<p>L.</p>
<br>
<blockquote type="cite"
cite="mid:CAPN1EhBMepvh1HhXdn38RGhQ5FxTd+10Gkqp6YSA3_aBwLt_sQ@mail.gmail.com"></blockquote>
</body>
</html>