Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!blars!blarson From: blarson@blars Newsgroups: comp.misc Subject: Re: How many different ASCII textfile formats are there? Message-ID: <212@blars> Date: 2 Jun 91 00:36:35 GMT References: <1991May27.162515.665@looking.on.ca> <1991May29.173405.2181@unx.sas.com> Sender: news@usc Reply-To: blarson@usc.edu Lines: 44 Nntp-Posting-Host: sis.usc.edu Originator: blarson@sis.usc.edu In article <1991May29.173405.2181@unx.sas.com> trumbull@unx.sas.com (Ed Trumbull) writes: >Brad Templeton asks for obscure ASCII text formats. Here's Prime's: If you are going to try the hopeless task of enumerating all ascii text file formats, at least get them right. (The answer to the question in the subject is: one more than the number of unique ascii text files.) > 1. Prime ASCII is "signed" -- extended ASCII characters go in bytes 0 to >127, and "normal" ASCII characters go in bytes 128 to 255. I dislike the "signed" term, but the parity bit is set on normal characters. > 2. Text lines are terminated by a newline. Lines are terminated by a Linefeed (^J) and the following byte is ignored if the number of characters in the line (including linefeed) is odd. Most programs use a NUL in the ignored position, and the file comparison utility (CMPF) incorrectly pays attention to the ignored byte. > 3. All occurrences of more than two spaces are compressed by replacing them >with a horizontal tab (DC1) and a byte count. DC1 (^Q, not tab) denotes the following byte is a number of spaces, 0 to 255. Most utilities only use this for 3 or more spaces. 4. trailing spaces may be trimmed by text processing programs. 5. printer files have even more strange things than text files. > (The newline is ignored as terminal input...) The standard terminal driver ignores linefeed and converst return to linefeed on input. In latter versions of primos, it is possible to turn off this misfeature. (Although leaving your terminal that way confuses the command processor.) This realy has nothing to do with text file formats. -- blarson@usc.edu C news and rn for os9/68k! -- Bob Larson (blars) blarson@usc.edu usc!blarson Hiding differences does not make them go away. Accepting differences makes them unimportant.