MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

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
>
>  
>



  • Prev by Date: Re: Reads only part of file
  • Next by Date: Re: solve and simplify. force left hand side to be 0==
  • Previous by thread: Re: Reads only part of file
  • Next by thread: "Notes for this message have not yet been added"?