Article 12310 of comp.lang.perl: Path: feenix.metronet.com!news.ecn.bgu.edu!usenet.ins.cwru.edu!howland.reston.ans.net!cs.utexas.edu!uunet!meaddata!petew From: petew@meaddata.com (Pete Williams) Newsgroups: comp.lang.perl Subject: ASCII<=>EBCDIC problem solved -- here's my solution! Date: 5 Apr 1994 23:53:05 GMT Organization: Mead Data Central, Dayton OH Lines: 112 Message-ID: <2nstl1$brl@meaddata.meaddata.com> NNTP-Posting-Host: fracture.meaddata.com Hi Fellow Perl[er|ite|ette]s: First of all, thanks to everyone who kindly responded to my requests for help with ASCII/EBCDIC translations. While I was a bit surprised that there seemed to be no library modules to do these conversions, I (with a little help from my friends) now offer you just such a beast... So much of our work revolves around IBM-style character conversions, that I found it hard to live without this little item. (I also hate having to kick off "dd" as a subprocess!). This is based on the ASCII<->EBCDIC/IBM tables from the GNU dd source, so data that converts properly with "dd" should perform similarly with this. I've tested out the EBCDIC<->ASCII routine quite a bit and it seems to work as advertised. The ASCII<->IBM stuff hasn't been tested at all (as I have no data to do so), so CAVEAT WHOMEVER. Please direct any complaints, bugs (and especially fixes!) to me and I will handle reposting or whatever. Enjoy, all you people living in the EBCDIC past (like me :-) Pete _/_/_/_/_/_/ _/_/_/_/_/_/_/_/_/_/_/_/ _/ "'Tis an ill wind that _/ _/ _/ _/ _/ _/ blows no minds" _/_/_/_/ _/_/_/ _/ _/_/_/_/_/_/_/_/_/ --Malaclypse the Younger _/ _/ _/ _/ _/ _/ _/_/_/_/ _/ _/_/_/_/ _/ == petew@meaddata.com == -------%x-------------------CUT-HERE-------------------%x------- begin 750 ascebc.pl M(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C M(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(PHC($%30T5"0RY03 HC M"B,@57-A9V4Z"B,@("!R97%U:7)E("=APH);&]C86PH)&ES=')I;F