=========================================== EBCDIC encoding by Ian Allen idallen@ncf.ca =========================================== Encode some text as 20-Byte records - long lines get truncated (or, we could use an extra record to hold the overflow) - short lines are blank padded at end Text: DAT2343 Computer Systems Architecture Fall 1999 123456789|123456789| ------------------------------------------------------ 000000 c4 c1 e3 f2 f3 f4 f3 40 40 40 40 40 40 40 40 40 D A T 2 3 4 3 000010 40 40 40 40 c3 96 94 97 a4 a3 85 99 40 e2 a8 a2 C o m p u t e r S y s 000020 a3 85 94 a2 40 c1 99 83 c6 81 93 93 40 f1 f9 f9 t e m s A r c F a l l 1 9 9 000030 f9 40 40 40 40 40 40 40 40 40 40 40 9 ------------------------------------------------------ Same file (same bits), printed as ASCII/Latin-1 instead of EBCDIC: ÄÁãòóôó@@@@@@@@@@@@@ä£@⨢£¢@ÁÆ@ñùùù@@@@@@@@@@@ Note how EBCDIC blanks appear as '@' in ASCII.