如何在 TDBEdit 中检测阿拉伯语输入

how to detect arabic input in TDBEdit

我有 TDBEdit 如何强制用户只用阿拉伯语书写

如何在 Delphi 中检测 (TDBEdit) 中的阿拉伯语输入?

使用 Tom 提到的文章你可以实现你想要的:

文章:Arabic blocks in Unicode.

检查以下输入

procedure TForm8.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
  Caption := 'arabic';
  case integer(key) of
    1536..1791,1872..1919,2208..2303,-1200..-513,-400..-257,8,32,48..57:
       begin
       end;
  else
    // intervene here by setting key = #0
    Caption :=key+ ': is not an arabic character';
end; 

以上数字是文章中十六进制值的十进制表示。