How can I de-escape my strings at run time?
Michael Meissner
meissner at osf.org
Wed Jun 6 00:23:26 AEST 1990
In article <+2X3GW9 at xds13.ferranti.com> peter at ficc.ferranti.com (Peter
da Silva) writes:
| In article <MEISSNER.90Jun3154100 at curley.osf.org> meissner at osf.org (Michael Meissner) writes:
| > It came up a few times. The problem is that ANSI C is not mandated to
| > require ASCII (or even ISO646). EBCDIC is the classic counterpoint.
|
| Are the rest of the escapes, in fact, portable? For example, does ebcdic
| have a separate \r and \n? I know some ASCII-based systems use the two
| interchangeably (OS/9, for example).
The C standard mandates that \r and \n have separate numeric values.
ANSI C doesn't cover what the system really does with \r and \n, just
the programmer's intent. I personally think \a, \r, and \v should not
be in the standard. The mainframe crowd at ANSI did say that there
were EBCDIC equivalents for the other escape sequences.
| Not to mention that C pretty much assumes you'll have non-portable
| characters like # and {} available...
That's why there are trigraphs.
| With another ANSI standard (X3.64, I think) specifying the interpretation of
| escape sequences, it's not even that unportable...
Not every terminal speaks X3.64. Try it on your local 3270 terminal
(or your DG terminal in DG mode....). Also, not everything is a
terminal, escape whatever also does things to printers, and such.
--
Michael Meissner email: meissner at osf.org phone: 617-621-8861
Open Software Foundation, 11 Cambridge Center, Cambridge, MA
Catproof is an oxymoron, Childproof is nearly so
More information about the Comp.lang.c
mailing list