写的时候是流,是乱码,正好起到加密的作用,如何从这些乱符中读出正常值来,
procedure TForm1.Button1Click(Sender: TObject);//写
var
  str:string;
  Fs:TFileStream;
begin
    str:='中国人';   
    try
     Fs:=TFileStream.Create('c:\aaa.txt',fmCreate);
      //Fs.WriteBuffer(pchar(str)^,Length(str));//你不能用这句
      //Fs.WriteBuffer(str[1],Length(str));//你不能用这句
      Fs.WriteBuffer(str,Length(str));//只能用这句,起到乱码的作用
    finally
      Fs.free;
    end;
end;procedure TForm1.Button2Click(Sender: TObject);//读
var
  str:string;
  fs:TFileStream;
begin
    try
      fs:=TFileStream.Create('c:\aaa.txt',fmOpenRead);
      SetLength(str,fs.size);//长度
      fs.ReadBuffer(str[1],fs.Size );
      Label1.Caption:=str;//如何在这里正确读出"中国人"
    finally
      fs.free;
    end;
end;