William, Though I don't have the specific answer, note that newer versions of Delphi use multi-byte Strings by default. Is there an option as project default to use ANSI strings, or else set the local String variable types to AnsiString.That might solve your problem. Bart
From: <wvido...@metsec.com> Subject: Error reading Binary files using Delphi2006 Dear All, I wrote an application using delphi5 which reads and writes binary file using TFilestream. But then when I ported the application to Delphi 2006 the files written using old application returns junk data in the new version. Sample file open procedure: procedure OpenProjectFile; var FSave:TFileStream; begin //open an existing project file FSave:=TFileStream.Create(Open1.FileName,fmOpenReadWrite); FSave.Read(MyData,Sizeof(MyData)); FSave.Free; end; MyData is a record which is the same in both sources. I am at a loss why this is happening. Can anyone throw some light on this? Thanks William _______________________________________________ Delphi mailing list Delphi@elists.org http://lists.elists.org/cgi-bin/mailman/listinfo/delphi