TMemo SelText problems (Lazarus / Linux)
Original Reporter info from Mantis: fedkad
-
Reporter name: Fedon Kadifeli
Original Reporter info from Mantis: fedkad
- Reporter name: Fedon Kadifeli
Description:
I am currently on latest trunk of Linux Lazarus (1.9.0): 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 appeared: When you try to update TMemo SelText from code with a string containing non-ASCII text, the output loses the non-ASCII characters (codepoints).
Steps to reproduce:
On an empty new form, drop a memo and a button, and run the following code:
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:
SelText := 'aöçe'; // letter-a, o-umlaut, c-cedilla, letter-e
it doesn't.
Additional information:
The following code works in 1.8.0:
procedure TForm1.Button1Click(Sender: TObject);
begin
with Memo1 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;
Mantis conversion info:
- Mantis ID: 33225
- OS: Ubuntu Linux
- OS Build: 17.10
- Build: 57370
- Platform: x86_64-linux-gtk2
- Version: 1.9 (SVN)
- Fixed in revision: r57376 (#e8412299)
- Monitored by: » fedkad (Fedon Kadifeli)