TMemo SelText problems (again?) in Linux lazarus / 31-LCL ---------------------------------------------------------------------- fedkad · 2018-02-25 11:38 Well, I am currently on latest trunk of Lazarus (1.9.0) / Linux: SVN 57370. (The problem reported for 1.8.0 at https://bugs.freepascal.org/view.php?id=32583 looks solved.) However, this time another problem has (re-)appeared. On an empty new form, drop a memo and a button, and run the following code: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.Button1Click(Sender: TObject);begin  with Memo1 do  begin    Text := '1234<>7890';    SelStart := 5;    SelLength := 0;    SelText := 'abce';    SetFocus;  end;end; It works as expected. However, when you replace the statement containing SelText with the following: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i     SelText := 'aöçe'; it doesn't. The following code works in 1.8.0: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.Button1Click(Sender: TObject);begin  with MemoTest do  begin  Text := '1234<>7890';    SelStart := 5;    SelLength := 0;    {$ifdef Linux}    //Bug: https://bugs.freepascal.org/view.php?id=32583    Application.ProcessMessages;    {$endif}    SelText := 'aöçe';    SetFocus;  end;end;  It seems that some Unicode stuff is messed up! ---------------------------------------------------------------------- fedkad · 2018-02-25 15:03 https://bugs.freepascal.org/view.php?id=33225