var
<wbr>S:UTF8String;</wbr>
<wbr>with TMemoryStream.Create do<br><wbr><wbr><wbr><wbr> try<br><wbr><wbr><wbr><wbr><wbr> LoadFromFile(ExtractFilePath(ParamStr(0))+'01C82Write.xml');<br><wbr><wbr><wbr><wbr><wbr> SetLength(S, Size);<br><wbr><wbr><wbr><wbr><wbr> Read(S[1], Length(S));<br><wbr><wbr><wbr><wbr><wbr> s := Utf8ToAnsi(Copy(S, 1, MaxInt));<br><wbr><wbr><wbr> finally<br><wbr><wbr><wbr><wbr><wbr> Free;<br><wbr><wbr><wbr> end;<br><wbr><wbr><wbr> showmessage( s);</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr></wbr>
========以上的可以=============================================================
<wbr>with TMemoryStream.Create do<br><wbr><wbr><wbr><wbr> try<br><wbr><wbr><wbr><wbr><wbr> LoadFromFile(ExtractFilePath(ParamStr(0))+'01C82Write.xml');<br><wbr><wbr><wbr><wbr><wbr> SetLength(S, Size);<br><wbr><wbr><wbr><wbr><wbr> Read(S[1], Length(S));<br><wbr><wbr><wbr><wbr><wbr> s := Utf8ToAnsi(Copy(S, 1, MaxInt));<br><wbr><wbr><wbr> finally<br><wbr><wbr><wbr><wbr><wbr> Free;<br><wbr><wbr><wbr> end;<br><wbr><wbr><wbr> showmessage( s);</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>