mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 19:36:32 +02:00
win32: compare length using UTF8Length()
git-svn-id: trunk@35367 -
This commit is contained in:
parent
d76c007767
commit
69545efcb9
@ -1237,7 +1237,7 @@ class procedure TWin32WSCustomEdit.SetText(const AWinControl: TWinControl;
|
||||
var
|
||||
ACustomEdit: TCustomEdit absolute AWinControl;
|
||||
begin
|
||||
if (ACustomEdit.MaxLength > 0) and (Length(AText) > ACustomEdit.MaxLength) then
|
||||
if (ACustomEdit.MaxLength > 0) and (UTF8Length(AText) > ACustomEdit.MaxLength) then
|
||||
TWin32WSWinControl.SetText(ACustomEdit, UTF8Copy(AText, 1, ACustomEdit.MaxLength))
|
||||
else
|
||||
TWin32WSWinControl.SetText(ACustomEdit, AText);
|
||||
|
Loading…
Reference in New Issue
Block a user