On Mon, 2002-05-13 at 07:07, Nicholas Clark wrote: > > Is this like the PNG file header?
Of course. I'm not that particularly clever. > 0xCC is >128, designed to detect if the file has been stripped to 7 bit Also, having the 8 bit set is often sufficient to trigger binary mode for primitive FTP auto-detectors. Putting it up front guarantees that it will be seen by anything looking for it. 0xCC itself is just an arbitrary number. Anything would do, although I wouldn't suggest 0xFF or 0xFE, since that's very UTF-8ish. > 0xOD 0xOA is CR LF, designed to detect if the file has been ftp'ed in > ASCII mode > 0x1A is ^Z, designed to detect if the file has been truncated by programs > that treat ^Z as EOF > ? That's the crux of it. We're just expanding the base of programs we're borrowing things from. (When I told Dan awhile ago that I wanted to borrow a page from the PNG folks, he said, "What? We're going to have code with an alpha channel?" :-) -- Bryan C. Warnock bwarnock@(gtemail.net|capita.com)