How can I de-escape my strings at run time?

Richard A. O'Keefe ok at goanna.cs.rmit.oz.au
Fri Jun 8 15:05:08 AEST 1990


In article <1600 at hulda.erbe.se>, prc at erbe.se (Robert Claeson) writes:
> Glad you asked. Yes, trigraphs are used for work, especially when not in
> an ASCII environment. EBCDIC, for example, doesn't have brackets and braces,

Er, this turns out not to be the case.  EBCDIC _has_ got curly braces.
Square brackets are not quite as good; there are actually _two_ different
sets of codes for the square brackets (historically connected with two
different "print chains") but the C compilers I've seen accept both.

> so C programmers in an EBCDIC environment are more or less forced to use
> trigraphs.

Whether EBCDIC has codes for these characters is one question (to which the
answer is, yes it has); whether you can easily use those characters in an
IBM environment (under VM/CMS for example) is another question, to which
the answer is again, _yes_.  I've sat by someone's side as he edited a C
program (the source code of TeX, as it happens, and TeX also relies
heavily on curly braces) using XEDIT, and it worked just fine.  There are
occasional glitches (BROWSE likes to display braces as blanks) but C and
TeX work just fine in an EBCDIC environment.
-- 
"A 7th class of programs, correct in every way, is believed to exist by a
few computer scientists.  However, no example could be found to include here."



More information about the Comp.lang.c mailing list