From: Erik Max Francis Newsgroups: comp.os.msdos.djgpp Subject: Re: help: read()ing from files containing 0x1A Date: Sat, 03 May 1997 13:33:47 -0700 Organization: Alcyone Systems Lines: 19 Message-ID: <336BA12B.6C9AABFC@alcyone.com> References: NNTP-Posting-Host: newton.alcyone.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Ethan Rohrer wrote: > I am trying to port some code from my UNIX account to my DOS machine. > My program reads a binary file using a open()/read()/close() sequence. > It worked like a champ in my UNIX account. > > Now, under DJGPP, I find that read() stops reading when it encounters > the EOF character (0x1A), which just happens to occur every here and > there in my binary files... Easy. Open the file in binary mode. -- Erik Max Francis, &tSftDotIotE / email / max AT alcyone DOT com Alcyone Systems / web / http://www.alcyone.com/max/ San Jose, California, United States / icbm / 37 20 07 N 121 53 38 W \ "The future / is right there." / Bill Moyers