SOS: C Routines for ASCII to EBCDIC Conversion and Vice-versa
Neil Rickert
rickert at mp.cs.niu.edu
Thu Jun 20 21:56:13 AEST 1991
In article <1991Jun19.190752.28034 at ssdc.honeywell.com> satya at ssdc.honeywell.com (Satya Prabhakar) writes:
>uses EBCDIC. I am looking for C routines that convert ASCII strings
>into EBCDIC strings and vice-versa. We need these DESPERATELY and
I don't understand. What is wrong with a simple loop replacing
c with EBCDIC[c] for each char c in the string of unsigned chars.
Something like:
while(*p) { *p = EBCDIC[*p]; p++;}
You do need to initialize your table. Pick up the tables used on the
3090 and use those. If you don't like that choice build your own in
the grand tradition of mutual inconsistency which currently exists in
the ASCII <-> EBCDIC translation world.
--
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
Neil W. Rickert, Computer Science <rickert at cs.niu.edu>
Northern Illinois Univ.
DeKalb, IL 60115 +1-815-753-6940
More information about the Comp.unix.questions
mailing list