I think the MaxLength property of TMemo is quite messed up.
On Windows it specifies the number of characters (=codepoints) not bytes. So, using the keyboard, you can enter the characters ÇÖÜçö in a memo with MaxLength of 5. However, programmatically (Memo1.Lines.Text := '1234567890';) you can enter more than MaxLength characters into the same memo; there is no control.
In Linux it is quite different. You can enter only 4 non-ASCII characters (e.g. ÇÖÜç) with the keyboard. And only 2 non-ASCII characters (e.g. ÇÖ) by pasting (CTRL+V) and programmatically (Memo1.Lines.Text := 'öç';). However after entering those two characters you can continue by entering 2 or 3 more characters from the keyboard depending on these being ASCII or non-ASCII:
öçüÖ
öçabc
öçüÖa
etc.
In Linux, programmatically trying to replace the characters in a memo (Memo1.Lines.Text := 'öçü'; //more than allowed?) will clear the memo contents, but will not insert anything; leaving you with a empty memo content.
So, in Windows there is no check on the length of data inserted programmatically (I assume it is left to the programmer); however, in Linux it is somehow checked, but very badly!