From: james.d.masters@... Date: 2007-04-16T12:05:06+09:00 Subject: Re: End-of-file character... On Apr 15, 2:41 pm, Sonny Chee 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've never heard of an end-of-file character. EOF happens when a file handle reaches the end of a file - not when it hits a specific character. Many binary file types use null padding at the end (character \0) although this is not an EOF character per se. To generate a null character, you could do this "\0".