🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.protocols.ibm
Article #1075

Re: SOS: C Routines for ASCII to EBCDIC Conversion and Vice-versa

#1075
From: Neil Rickert
Date: Thu, 20 Jun 1991 11:56
20 lines
1447 bytes
In article <1991Jun19.190752.28034@ssdc.honeywell.com> satya@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@cs.niu.edu>
  Northern Illinois Univ.
  DeKalb, IL 60115                                   +1-815-753-6940
Technical Details
Message-ID: <1991Jun20.115613.13073@mp.cs.niu.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!uwm.edu!linac!mp.cs.niu.edu!rickert
References: <1991Jun19.190752.28034@ssdc.honeywell.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!uwm.edu!linac!mp.cs.niu.edu!rickert
From: rickert@mp.cs.niu.edu (Neil Rickert)
Newsgroups: comp.protocols.ibm,comp.protocols.iso,comp.protocols.tcp-ip,comp.unix.questions
Subject: Re: SOS:  C Routines for ASCII to EBCDIC Conversion and Vice-versa
Message-ID: <1991Jun20.115613.13073@mp.cs.niu.edu>
Date: 20 Jun 91 11:56:13 GMT
References: <1991Jun19.190752.28034@ssdc.honeywell.com>
Organization: Northern Illinois University
Lines: 20