Searching the Internet I found
function RawStr(const Str: string): Pointer;
begin
Result := TNSString.OCClass.stringWithUTF8String(PAnsiChar(UTF8String(Str)));
end;
at https://stackoverflow.com/questions/17499819/control-mplayer-via-pipe-in-macos-with-xe4