-
EBCDIC files
I am dealing with ASCII and EBCDIC files within my program. I need to be able determine (from within my program) if a file is EBCDIC, then convert it to ASCII. I have the conversion routine, but I need to be able to tell if a file is EBCDIC. Any ideas?
I have looked at a couple of hex dumps of EBCDIC files. So far both files start out with the following characters:
1E F1 F0 F0 F0 F0 F0 F0 F0 F0 F0 F1 1F F0 F0 F0
F0 F0 F1 40 40 40 40 F0 F0 40 F0
Do all EBCDIC files start this way?
Thanks in advance.
-
http://www.tuxedo.org/~esr/jargon/ht...ry/EBCDIC.html
EBCDIC /eb's*-dik/, /eb'see`dik/, or /eb'k*-dik/ n.
[abbreviation, Extended Binary Coded Decimal Interchange Code] An alleged character set used on IBM dinosaurs. It exists in at least six mutually incompatible versions, all featuring such delights as non-contiguous letter sequences and the absence of several ASCII punctuation characters fairly important for modern computer languages (exactly which characters are absent varies according to which version of EBCDIC you're looking at). IBM adapted EBCDIC from punched card code in the early 1960s and promulgated it as a customer-control tactic (see connector conspiracy), spurning the already established ASCII standard. Today, IBM claims to be an open-systems company, but IBM's own description of the EBCDIC variants and how to convert between them is still internally classified top-secret, burn-before-reading. Hackers blanch at the very name of EBCDIC and consider it a manifestation of purest evil. See also fear and loathing.