Author: Jonas Bilinkevicius
Our compiler does not support characters with accents. What is the best way to
check if the strings we pass to the compiler have accents or not?
Answer:
If you check to see that every character in the string falls in the range of #$00
to #$7F, you can be sure that it contains no accented letters. Something like this
will do:
1 function ContainsAccents(const S: string): Boolean;
2 var3 I: Integer;
4 begin5 for I := 1 to Length(S) do6 if S[I] > #$7F then7 begin8 Result := True;
9 Exit;
10 end;
11 Result := False;
12 end;