Re: Reads only part of file
- To: mathgroup at smc.vnet.net
- Subject: [mg51166] Re: [mg51163] Reads only part of file
- From: "Maxim A. Dubinnyi" <maxim at nmr.ru>
- Date: Thu, 7 Oct 2004 05:25:43 -0400 (EDT)
- References: <200410060835.EAA24296@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Use option DOSTextFormat->False while opening a stream: strm=OpenRead["filename", DOSTextFormat->False] ReadList[strm, ....] Close[strm] This option is required on Windows platform, Linux version of Mathematica reads correctly any type of text/binary files. Sincerely, Maxim A. Dubinnyi Steve Gray wrote: > My previous post said that only part of my binary file was reading in. Further investigation >shows that Mathematica stopped reading when it got to a data byte value of $1A = 26, which is an EOF value. > Help says it will do this but does NOT say how to keep reading the file. Obviously in a >binary file any value must be readable. I am getting around this for now by changing all the 1A's to >1B's with a hex file editor (which does NOT have trouble reading past EOF's), but this is a pretty >awful solution. > Is there a better way? Thanks for any leads. > >Steve Gray > > >
- References:
- Reads only part of file
- From: Steve Gray <stevebg@adelphia.net>
- Reads only part of file