ADO Database Delphi

procedure TMainForm.ApplicationEvents1Message(var Msg: tagMSG;
var Handled: Boolean);
begin
// replacing persian incorrect char on get from keyboard, in all of the Tcontrols!
// without this code,ms-sql server have incorrect result set after sort on persian field.
// some perisan char in win2000 have same shape but differ in ordering
if Msg.message = WM_CHAR then // for settting char ( kaf) in win2000
begin
if Msg.wParam = 152 then
Msg.wParam := 223
// and more......
end;
end;