Trigraphs.

Ray Butterworth rbutterworth at watmath.waterloo.edu
Wed Jun 8 00:27:21 AEST 1988


Let's consider the various combinations of compilers and terminals.
Commonly, either of these can be US-ASCII, 7-bit French-ASCII (or
some other national character set), or 8-bit IS0-ASCII.

1) if I am using a US-ASCII terminal, I have the full C source
character set at my fingertips and all three types of compilers
must accept these characters according to the way they appear
on my screen.  Thus, I have no need for trigraphs.

2) similarly, if I am using an ISO-ASCII terminal, the keyboard will
contain the full C source character set, and all three types of
compilers must accept these characters.  Thus, I still have no need
for trigraphs.

3) finally, if I am using a 7-bit French-ASCII terminal, the situation
is a little more complicated.

3a) if the compiler only knows about US-ASCII I have a choice of
entering "\" either as "??/" or as "cedilla-c".

3b) if the compiler uses ISO-ASCII, then again I must enter "\"
either as "??/" or as "cecilla-c".

3c) and finally, if the compiler knows about French-ASCII, then I
would think that I must enter "\" as "??/", since the compiler
will treat "cedilla-c" as a real letter.  But if I try to define
static char language??(??) = "FranCais";
where the "C" is actually the cedilla-c character, then strange
things will happen since the standard says that the character set
must include the "\" character, and so the string will actually
contain "Fran\ais", which is "Fran<beep>is".  Thus again I still
have the choice of entering "\" as either "??/" or as "cedilla-c".

So, putting this all together, regardless of what the compiler's
character set is, it is only the French-ASCII terminal that has
any need of the trigraphs.  Now, on such a terminal I cannot
use the cedilla-c character as anything but a back-slash since
all three types of compilers must interpret this as a back-slash,
and not as a cedilla.

So, the only case that needs trigraphs is the French-ASCII terminal,
and such a terminal will have nine keys that I am better off not
using since they appear to give me something that I don't really
get.

People using French have three choices.  Use the trigraphs and
avoid those 9 keys; use those 9 keys, remembering their special
meanings and forget about trigraphs; or get a different terminal
and forget about trigraphs.

That reduces the cases that need trigraphs to those that have
French-ASCII terminals and that also prefer to avoid using the
national keys.

>From what I can gather, there are not many people still buying
French-ASCII terminals and those that have such terminals seem
to prefer using the funny characters to using the trigraphs.
Consider that at the moment trigraphs don't even exist outside
the minds of the X3J11 Committee, and decide how many people
that now use the funny characters and are going to switch to
using trigraphs.

The number of people that would actually use trigraphs must
be amazingly small.  For what it is costing the Committee in
time, the publishers in paper, the net in shipping articles
denouncing trigraphs, and the readers in time to read these
articles, I'm sure it would be cheaper if we all chipped in
and bought new terminals for those few individuals and then
completely dropped the concept of trigraphs from the Standard.



More information about the Comp.std.c mailing list