[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] EBCDIC in, ASCII out?




John Gilmore-Baldwin wrote:

> That's what I need to do, take an EBCDIC file, and translate it to ASCII.
> 
> While the task isn't that difficult, if somebody has already written an
> elegant solution, I feel no need to do it too.  So, if anybody know of a
> solution for this conversion that's already done, please let me know.

There are a number of modules on CPAN that handle this.  Many are simply 
implemented using perl arrays and the tr// operator - hence they involve 
no XS coding at all.  Some allow for choosing and/or setting various 
codepages.  For example:

  http://www.cpan.org/authors/id/CXL/
  http://www.cpan.org/authors/id/CXL/Convert-EBCDIC-0.06.tar.gz
    
Geoffrey Rommel has recently posted a couple of Convert::IBM390
modules to the CPAN.  Convert-IBM390-0.01 is an xs based module
(fast) and Convert-IBM390p-0.01 is a pure perl module (may be slower
but easier to install, particularly on platforms without C compilers).
I've not yet had a chance to try them out but folks are certainly welcome
to do so.  See:

  http://www.cpan.org/authors/id/G/GR/GROMMEL/
  http://www.cpan.org/authors/id/G/GR/GROMMEL/Convert-IBM390-0_01_tar.gz

See also:

  http://www.cpan.org/authors/Genji_Schmeder/
  http://www.cpan.org/authors/Genji_Schmeder/Convert-Translit-1.03.tar.gz

which was developed on a Mac (I do not know what EBCDIC codepages are
mentioned in RFC 1345 unfortunately).

Peter Prymmer



===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org