<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<br>
<blockquote type="cite"
cite="mid:4d7bfa03-7ad1-7e5f-7953-8a47213a25da@freepascal.org">
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">attached simple Lazarus compilable project (one Form).
...
type
String1250 = type AnsiString(1250);
const
c2: AnsiString = 'áéíóčž';
c3: WideString = 'áéíóčž';
c4: String1250 = 'áéíóčž';
{ TForm1 }
procedure TForm1.FormShow(Sender: TObject);
begin
label1.Caption:='áéíóčž'; // FAIL
label2.Caption:=c2; // FAIL
label3.Caption:=c3; // OK
label4.Caption:=c4; // FAIL
end;
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
The attached pure FPC-variant of your project works fine with FPC 3.2.0
for me (except for the very first writeln, because that one gets
interpreted as "writeln(shortstring)"),</pre>
</blockquote>
<p><b>yes for me on Windows it works also (under Lazarus 2.0.8 with
FPC 3.0.4)<br>
</b></p>
<p><b><br>
</b></p>
<blockquote type="cite"
cite="mid:4d7bfa03-7ad1-7e5f-7953-8a47213a25da@freepascal.org">
<pre class="moz-quote-pre" wrap=""> so it may be Lazarus-specific.
Best ask it on the Lazarus list or post it on their bug tracker instead.</pre>
</blockquote>
<p><b>I add CC also to Lazarusdev group<br>
(attached simple project)<br>
</b></p>
<p><b><br>
</b></p>
<blockquote type="cite"
cite="mid:4d7bfa03-7ad1-7e5f-7953-8a47213a25da@freepascal.org">
<pre class="moz-quote-pre" wrap="">
Also make sure you did *not* build your Lazarus with -dDisableUTF8RTL</pre>
</blockquote>
<p><b>I do not build Lazarus with -dDisableUTF8RTL (I simply use
default installation)</b></p>
<p><b>As Sven wrote there is at least "c4" case, where declared code
page (AnsiString(1250)) is different from AnsiString (CP_ACP)
codepage and also from dynamic code page (DefaultSystemCodepage
which is under Lazarus (UTF8=65001))</b></p>
<p><b>I am still confused how this CodePage aware stuff is expected
to work and when implicit conversios are included (as far as I
understand here ONLY declared/static codepage plays role) and
when dynamic codepage is taken into account and when not?</b></p>
<p><b>L.</b></p>
<br>
<blockquote type="cite"
cite="mid:4d7bfa03-7ad1-7e5f-7953-8a47213a25da@freepascal.org">
</blockquote>
</body>
</html>