, String(a) = AnsiString(a), , , . . "" " - 1252" ( , ). , , , 1252.
function StringIs1252(const S: UnicodeString): Boolean;
const
WC_NO_BEST_FIT_CHARS = $00000400;
var
UsedDefaultChar: BOOL;
Len: Integer;
begin
if Length(S) = 0 then
Exit(True);
UsedDefaultChar := False;
Len := WideCharToMultiByte(1252, WC_NO_BEST_FIT_CHARS, PWideChar(S), Length(S), nil, 0, nil, @UsedDefaultChar);
if Len <> 0 then
Result := not UsedDefaultchar
else
Result := False;
end;
, ansi - , , , # 0.. # 127.