are there some special about '\x1a' symbol

R Fritz rfritz at
Thu Jan 15 05:34:41 CET 2009

Raps cane on floor.

It's probably an "end-of-file" sentinel because 'Z' is the last letter 
of the alphabet. I suspect it comes from MIT. Unix, developed at a 
telephone company, uses \x4, which was, in fact, the ASCII in-band 
end-of-transmission code and would disconnect a teletype.

Does this qualify me for the dinosaur award?

R Fritz

On 2009-01-14 07:15:33 -0800, Mel <mwilson at> said:

> Steve Holden wrote:
>> Unknown wrote:
>>> On 2009-01-12, John Machin <sjmachin at> wrote:
>>>> I didn't think your question was stupid. Stupid was (a) CP/M recording
>>>> file size as number of 128-byte sectors, forcing the use of an in-band
>>>> EOF marker for text files (b) MS continuing to regard Ctrl-Z as an EOF
>>>> decades after people stopped writing Ctrl-Z at the end of text files.
>>> I believe that "feature" was inherited by CP/M from DEC OSes
>>> (RSX-11 or RSTS-11). AFAICT, all of CP/M's file I/O API
>>> (including the FCB) was lifted almost directly from DEC's
>>> PDP-11 stuff, which probably copied it from PDP-8 stuff.
>>> Perhaps in the early 60's somebody at DEC had a reason.  The
>>> really interesting thing is that we're still suffering because
>>> of it 40+ years later.
>> I suspect this is probably a leftover from some paper tape data formats,
>> when it was easier to detect the end of a file with a sentinel byte than
>> it was to detect run-off as end of file. It could easily date back to
>> the PDP-8.
> Perhaps, although in ASCII it's the SUB symbol: "A control character that is
> used in the place of a character that is recognized to be invalid or in
> error or that cannot be represented on a given device." [Wikipedia].  There
> were other codes defined for End-of-Text and File-Separator.  Unless the
> protocol were one of DEC's own.  The fact that it's
> Ctrl-last-letter-of-the-alphabet makes me suspect that it was picked in a
> pretty informal way.
>         Mel.

More information about the Python-list mailing list