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

Robert Claeson prc at erbe.se
Thu Jun 7 21:46:23 AEST 1990


In article <BSY3JUC at xds13.ferranti.com>, peter at ficc.ferranti.com (Peter da Silva) writes:

> > That's why there are trigraphs.
> 
> Does anyone actually use them for work? It seems to me they're pretty much
> unusable in practice except for transferring code between environments.

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,
so C programmers in an EBCDIC environment are more or less forced to use
trigraphs.

Most national variants of the ISO 646 7-bit character set (except for the
U.S. and U.K. variants) doesn't have them either, but programmers have learned
to use whatever character that happens to have the same character code as
the special characters. For example, using the Swedish variant of ISO 646,
'[' is substituted with the alphabetical character A-diaeresis, '^' is
substituted with U-diaeresis, '~' is substituted with u-diaeresis and so on.

There is at least good to have a standard for the 'special characters'.
Pascal programmers in an EBCDIC environment has to use .( and .) instead
of [ and ], but there's no standard for that so it is not portable.

-- 
          Robert Claeson      E-mail: rclaeson at erbe.se
	  ERBE DATA AB



More information about the Comp.lang.c mailing list