Re: The 26 problem when reading binary files
- To: mathgroup at smc.vnet.net
- Subject: [mg3436] Re: The 26 problem when reading binary files
- From: withoff (David Withoff)
- Date: Thu, 7 Mar 1996 02:24:19 -0500
- Organization: Wolfram Research, Inc.
- Sender: owner-wri-mathgroup at wolfram.com
In article <4hbgka$4uu at dragonfly.wolfram.com> peter at physto.se (peter) writes: > When reading a binary file as e.g. list of Byte, Mathematica interprets > a 26 as A EndOfFile character and terminates filereading. > Is there a way to avoid this without using the package FastBinaryFiles > (that requires Mathlink and preferably a higher version of Mathematica > than what I have. > > PW > Mathematica can only open files in "text" mode, as opposed to "binary" mode. In all systems other than those that evolved from DOS it doesn't make an difference, but in DOS (or Windows, or ...) it does, in which case the only way to get a binary file into Mathematica is to open the file with a separate application that delivers text to Mathematica. MathLink is the most common way to do that, but it isn't the only conceivable way. You could, for example, write a program that reads the binary file and writes out a corresponding text file, after which you could read the text file into Mathematica. Other facilities for reading DOS-like binary files will probably be added for the next release of Mathematica. Dave Withoff Research and Development Wolfram Research ==== [MESSAGE SEPARATOR] ====