Function IsUnicode(S:String):Boolean;
function WStrLen(const S: WideString): Integer;overload;
begin
if Pointer(S) = nil then
Result := 0
else
Result := PInteger(Integer(S) - 4)^ div sizeof(WideChar);
end;
function AStrLen(const S: AnsiString): Longint;overload;
begin
Result := Longint(S);
if Result <> 0 then
Result := PLongint(Result - 4)^;
end;
var
WS : String;
begin
WS := S;
Result := WStrLen(WS) <> AStrLen(S);
end;