Austin Ziegler wrote:
> On 4/15/07, Tim Pease <tim.pease / gmail.com> wrote:
>> On 4/15/07, Sonny Chee <sonny.chee / gmail.com> wrote:
>> > Does anyone know of a cross-platform way of generating an 'end-of-file'
>> > character? Alternatively, does anyone know how to figure out what the
>> > 'end-of-file' character is for a particular OS?
>> I had no idea it was platform dependent.  I always assumed it was ^D
>> for all platforms.
>>
>> "\004" should be it.
> 
> This is not correct. There is, in fact, no "end-of-file" character on
> Unix, and Ctrl-Z (0x26) is the end-of-file character on Windows only
> when the file is not opened in binary mode. It is conventional for a
> terminal to accept Ctrl-D (0x04) as an end of file character, but this
> is convention, not standard.

And, except on terminals, ^Z has been obsolescent on DOS and Windows 
since DOS 1.1, twenty-five years ago.

-- 
John W. Kennedy
"Give up vows and dogmas, and fixed things, and you may grow like That. 
...you may come to think a blow bad, because it hurts, and not because 
it humiliates.  You may come to think murder wrong, because it is 
violent, and not because it is unjust."
   -- G. K. Chesterton.  "The Ball and the Cross"
* TagZilla 0.066 * http://tagzilla.mozdev.org