need EBCDIC to ASCII function

Alan Myrvold alanm at cognos.UUCP
Mon Oct 23 13:45:52 AEST 1989


In article <455 at laas.laas.fr> ralph at laas.laas.fr (Ralph P. Sobek) writes:
>In article <7214 at cognos.UUCP> I writes (sic):
>>  In article <1060 at einstein.misemi> lalonde at .UUCP (Terry Lalonde) writes:
>>>I need a C function that converts a given EBCDIC character
>>  Based on the Unix 'dd conv=ascii' conversions :
>>  Men aren't pigs ... pigs are smarter
 
>How true, but aren't there still TWO official translations between
>ASCII and EBCDIC?

Even the "official" translations sometimes break ... if the data started
off as ASCII, and is ending up that way, with only a brief soujourn as
EBCDIC, the only important thing is that the ASCII->EBCDIC translation
be the inverse of the EBCDIC->ASCII.

If the data is ending on a differently coded system from the one it 
started on, the print-train or compiler on the ending system must
be accomodated.

The Unix 'dd' command (here) has 2 different ASCII->EBCDIC conversions, 
but only one EBCDIC->ASCII. The translation that I supplied was the 
EBCDIC->ASCII one. Its pretty good as a starting point, and I imagine
Terry Lalonde, should she/he choose to use it, will be bright enough to
make minor modifications to fit his/her needs.

>>  Men aren't pigs ... pigs are smarter

Why is male bashing socially acceptable these days? I thought feminism
was all about equality! (Follow-ups on this point NOT to comp.lang.c!).

--
Chateau des Charmes Aligote is too delicate a wine for Libby's Zoodles
(Follow-ups on this point NOT to comp.lang.c either!).
--
Alan Myrvold          3755 Riverside Dr.     uunet!mitel!sce!cognos!alanm
Cognos Incorporated   P.O. Box 9707          alanm at cognos.uucp
(613) 738-1440 x5530  Ottawa, Ontario       
                      CANADA  K1G 3Z4       



More information about the Comp.lang.c mailing list