From 69545efcb91524ec6adaafa611875fae2f720aed Mon Sep 17 00:00:00 2001 From: paul Date: Wed, 15 Feb 2012 02:37:56 +0000 Subject: [PATCH] win32: compare length using UTF8Length() git-svn-id: trunk@35367 - --- lcl/interfaces/win32/win32wsstdctrls.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lcl/interfaces/win32/win32wsstdctrls.pp b/lcl/interfaces/win32/win32wsstdctrls.pp index 92064922e6..0d7d82f1f5 100644 --- a/lcl/interfaces/win32/win32wsstdctrls.pp +++ b/lcl/interfaces/win32/win32wsstdctrls.pp @@ -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);