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

P E Smee exspes at gdr.bath.ac.uk
Mon Jun 11 19:21:36 AEST 1990


In article <3190 at goanna.cs.rmit.oz.au> ok at goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes:
>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 
>
>> 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_.  

Or, sometimes, _no_.  This depends heavily on precisely what
make/model, and even submodel of terminal you have (some but not all
3270's work, for example) and on the precise details of how they are
connected to the machine.  And, possibly, even on how your MAINT has
configured things.

I had to port a large C program to VM/CMS and had no problems while I
was working in the machine room.  When I got things stabilised enough
to work from my office, I found that a number of the C 'special chars'
didn't work (and worse, would be garbaged by the editor) and was forced
into using trigraphs.  The only reconfiguration I could find to avoid
this had the unfortunate side-effect of making one of our printers
(connected through the same controller) print garbage, and so wasn't
on.  Our IBM bod suggested that the solution was to buy yet another
controller, dedicated to the printer.

-- 
Paul Smee, Computing Service, University of Bristol, Bristol BS8 1UD, UK
 P.Smee at bristol.ac.uk - ..!uunet!ukc!bsmail!p.smee - Tel +44 272 303132



More information about the Comp.lang.c mailing list