Thanks, it didn't compile, this this did: function SSwapEndian(const S: UnicodeString): UnicodeString; var i: integer; p: PWord; begin Result:= S; if S='' then exit; UniqueString(Result); P:= PWord(@Result[1]); for i:= 1 to Length(Result) do begin P^:= SwapEndian(P^); Inc(P); end; end; AlexeyT