Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!snorkelwacker!paperboy!meissner From: meissner@osf.org (Michael Meissner) Newsgroups: comp.lang.c Subject: Re: How can I de-escape my strings at run time? Message-ID: Date: 5 Jun 90 14:23:26 GMT References: <6550.26639B0A@puddle.fidonet.org> <2596@litchi.bbn.com> <896@wraith.cs.uow.edu.au> <:9W3JZ3@ggpc2.ferranti.com> <+2X3GW9@xds13.ferranti.com> Sender: news@OSF.ORG Organization: Open Software Foundation Lines: 34 In-reply-to: peter@ficc.ferranti.com's message of 4 Jun 90 14:10:51 GMT In article <+2X3GW9@xds13.ferranti.com> peter@ficc.ferranti.com (Peter da Silva) writes: | In article meissner@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@osf.org phone: 617-621-8861 Open Software Foundation, 11 Cambridge Center, Cambridge, MA Catproof is an oxymoron, Childproof is nearly so