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;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)"),
*yes for me on Windows it works also (under Lazarus 2.0.8 with FPC 3.0.4) * * *
so it may be Lazarus-specific. Best ask it on the Lazarus list or post it on their bug tracker instead.
*I add CC also to Lazarusdev group (attached simple project) * * *
Also make sure you did *not* build your Lazarus with -dDisableUTF8RTL
*I do not build Lazarus with -dDisableUTF8RTL (I simply use default installation)*
*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))*
*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?*
*L.*
<<attachment: test_cp1250.ZIP>>
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal