Hi,
it is probably bug in LCL or I'm something missing.
Lazarus 1.6.4
FPC 3.0.2
CentOS 7 64-bit
Widget Qt4, GTK2
System Locale: LANG=cs_CZ.utf8
procedure TForm1.Button1Click(Sender: TObject);
const
NinthMonthName:string = 'září';
begin
Edit1.Text:= DefaultFormatSettings.LongMonthNames[9]+' Length '+IntToStr(Length(DefaultFormatSettings.LongMonthNames[9]));
Edit2.Text:= NinthMonthName+' Length '+IntToStr(Length(NinthMonthName));
end;
Return
z???. String length: 4
září.String length 7
But in terminal application it works correctly
program project1;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Classes,SysUtils,clocale
{ you can add units after this };
const
NinthMonth:string = 'září';
begin
writeln('9-th month from const: ',NinthMonth, ' .String length ',Length(NinthMonth));
writeln('9-th month from DefaultFormatSettings: ',DefaultFormatSettings.LongMonthNames[9],'. String length ',Length(DefaultFormatSettings.LongMonthNames[9]));
end.
Return
9-th month from const: září .String length 7
9-th month from DefaultFormatSettings: září. String length 7