Chris Leach > Convert-EBCDIC-0.06 > Convert::EBCDIC

Download:
Convert-EBCDIC-0.06.tar.gz

Dependencies

Annotate this POD (6)

Related Modules

Net::FTP
Convert::IBM390
IO::Scalar
Net::Netrc
more...
By perlmonks.org

CPAN RT

New  2
Open  0
View/Report Bugs
Module Version: 0.06   Source  

NAME ^

Convert::EBCDIC, ascii2ebcdic, ebcdic2ascii - Perl module for string conversion between EBCDIC and ASCII

SYNOPSIS ^

  use Convert::EBCDIC;
  $ascii_string = ebcdic2ascii($ebcdic_string);
  $ebcdic_string = ascci2ebcdic($ascii_string);

  $translator = new Convert::EBCDIC;
  $translator = new Convert::EBCDIC($table);
  $ascii_string = $translator->toascii($ebcdic_string);
  $ebcdic_string = $translator->toebcdic($ascii_string);

  $Convert::EBCDIC::ccsid819

DESCRIPTION ^

This module can be used to import then functions ascii2ebcdic and/or ebcdic2ascii or in an Object mode.

Exported Functions:

ascii2ebcdic()

takes as the first argument a EBCDIC string that is to be converted to ASCII using default converion table.

ebcdic2ascii()

takes as the first argument a ASCII string that is to be converted to EBCDIC using default converion table.

Object methods:

new()

creates a new translator object. Will take an optional argument being a 256 character conversion table.

toascii()

takes and ASCII string and return and EBCDIC string.

toebcdic()

takes and EBCDIC string and return and ASCII string.

Translation tables:

$Convert::EBCDIC::ccsid819

Character Code Set ID 00819. This is the default on most systems.

$Convert::EBCDIC::ccsid1047

Character Code Set ID 01047. This is the default on OS390.

PORTABILITY ^

This module should work on any system with Perl 5. Tested under SPARC Solaris, OS390, HP-UX AS400/OS400 RISC.

AUTHOR ^

Chris Leach <leachcj@bp.com>.

syntax highlighting: