|
|
|
|
|
by anonymousiam
2292 days ago
|
|
CP/M and DOS use ^Z (0x1A) as an EOF indicator. More modern operating systems use the file length (if available). Unix/Linux will treat ^D (0x04) as EOF within a stream, but only if the source is "cooked" and not "raw". (^D is ASCII "End Of Transmission or EOT" so that seems appropriate, except in the world of unicode.) |
|
For example,
will confirm that it doesn't happen in a pipe (the ASCII 4 character there is totally unrelated to EOF).