[comp.unix.wizards] ASCII

henry@utzoo.uucp (Henry Spencer) (10/25/88)

In article <3989@rlvd.UUCP> caag@inf.rl.ac.uk (Crispin Goswell) writes:
>>ASCII is ASCII anywhere....
>
>Not in Europe it isn't. Pick up a manual for a Japanese matrix printer some
>time: you'll find at least ten variants...

The original statement stands:  ASCII is ASCII everywhere.  This is not
changed by the deplorable tendency to slap the label "ASCII" on anything
that happens to resemble ASCII in some way.

>Even in versions of ASCII for the same country you sometimes find that a
>subset of &$#^~\_{}[]` get variously interchanged on printers or VDUs.

These character sets are not versions of ASCII.  They are instantiations
of the ISO 7-bit set; ASCII is another such instantiation.

ASCII is a single, well-defined, well-specified character set, with no
significant variations allowed.  And by and large, existing implementations
of it follow the standard fairly well.  There are a wide range of 8-bit
character sets that have ASCII as a subset, but the ASCII inside them is
generally pretty pure.  (ASCII is defined as 7 and only 7 bits, so these
character sets are ASCII+XYZ, not variants of ASCII.)  There are also a
number of other 7-bit character sets related to ASCII, in that they too
are instantiations of the ISO 7-bit set, but they are not ASCII, and only
marketing turkeys pretend that they are.
-- 
The dream *IS* alive...         |    Henry Spencer at U of Toronto Zoology
but not at NASA.                |uunet!attcan!utzoo!henry henry@zoo.toronto.edu

pjh@mccc.UUCP (Pete Holsberg) (10/27/88)

In article <1988Oct24.201751.19602@utzoo.uucp> henry@utzoo.uucp (Henry Spencer) writes:
...ASCII is a single, well-defined, well-specified character set, with no

Except, of course, for LINE FEED/NEWLINE.

-- 
Pete Holsberg                   UUCP: {...!rutgers!}princeton!mccc!pjh
Mercer College			CompuServe: 70240,334
1200 Old Trenton Road           GEnie: PJHOLSBERG
Trenton, NJ 08690               Voice: 1-609-586-4800

henry@utzoo.uucp (Henry Spencer) (10/29/88)

In article <359@mccc.UUCP> pjh@mccc.UUCP (Pete Holsberg) writes:
>>...ASCII is a single, well-defined, well-specified character set...
>
>Except, of course, for LINE FEED/NEWLINE.

Actually, if one is being picky, there are a number of permissible
variations in how control characters are handled.  (Which doesn't affect
the original discussion about printing characters.)  The LF/NL business
is one of those variations.  Yes, newline is permitted by the standard,
assuming both ends agree.
-- 
The dream *IS* alive...         |    Henry Spencer at U of Toronto Zoology
but not at NASA.                |uunet!attcan!utzoo!henry henry@zoo.toronto.edu

davidsen@steinmetz.ge.com (William E. Davidsen Jr) (10/29/88)

In article <359@mccc.UUCP> pjh@mccc.UUCP (Pete Holsberg) writes:
| In article <1988Oct24.201751.19602@utzoo.uucp> henry@utzoo.uucp (Henry Spencer) writes:
| ...ASCII is a single, well-defined, well-specified character set, with no
| 
| Except, of course, for LINE FEED/NEWLINE.

  I think Henry's right. There is no newline in ASCII, it's a feature(?)
of the C language, and should not be confused with a real character. If
C had only used a non-carriage control character to delimit records,
say... the record separator character, there would be less hassle with
when is it a newline and when is it carriage control.
-- 
	bill davidsen		(wedu@ge-crd.arpa)
  {uunet | philabs}!steinmetz!crdos1!davidsen
"Stupidity, like virtue, is its own reward" -me

guy@auspex.UUCP (Guy Harris) (10/29/88)

>  I think Henry's right. There is no newline in ASCII,

Well, I don't have ANSI X3.4-1977 handy to check what Line Feed really
means in the original spec for ASCII, but I *do* have ANSI X3.64-1979
handy, and in its description of LINE FEED NEW LINE MODE (for all the
UNIX hackers in the audience, you can think of it as "am" :-)) it says:

	The reset state causes the interpretation of the Format effector
	Line Feed (LF) defined in ANSI X3.4-1977 to imply only vertical
	movement of the active position.  The set state causes the
	Format Effector Line Feed (LF) to imply movement to the first
	position of the following line.

>it's a feature(?) of the C language,

Well, originally more of a feature of the UNIX operating system, which C
inherited - or, more correctly, a feature of the Multics operating
system (no, it's not a feature of the PL/I language :-)) that UNIX
picked up.

henry@utzoo.uucp (Henry Spencer) (11/01/88)

In article <356@auspex.UUCP> guy@auspex.UUCP (Guy Harris) writes:
>>  I think Henry's right. There is no newline in ASCII,
>
>Well, I don't have ANSI X3.4-1977 handy to check what Line Feed really
>means in the original spec for ASCII...

"New Line" is explicitly specified as an alternate interpretation of
"Line Feed", to be used if and only if both ends of the communication
agree on it.
-- 
The dream *IS* alive...         |    Henry Spencer at U of Toronto Zoology
but not at NASA.                |uunet!attcan!utzoo!henry henry@zoo.toronto.edu