logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Charset::EBCDIC - convert between INTERCAL variant of EBCDIC and ASCII

Description

Charset::EBCDIC defines functions to convert between a subset of ASCII and a subset of nonstandard EBCDIC
       (since there isn't such a thing as a standard EBCDIC we defined our own variant which is guaranteed to be
       incompatible with all versions of EBCDIC used by IBM hardware - however, when we have chosen a code for a
       character, we have made sure that at least one - but certainly not all - IBM models used that same code,
       so the choice cannot be criticised). If you really want to know, several variants of EBCDIC are listed in
       RFC 1345, which is available from the usual sources.

       Two functions, ebcdic2ascii and ascii2ebcdic are exportable but not exported by default. They do the
       obvious thing to their first argument and return the transformed string.

Ebcdic Character Table

       The following are the characters recognised. The ones shown as 2 letter abbreviations cannot be
       translated to ASCII (except for the control characters, which do have an ASCII equivalent).

            +   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f   Notes
           00                          OV TA LF       CR         OV=overstrike
           10                                                    TA=tab
           20                                                    LF=linefeed
           30                                                    CR=carr-return
           40  SP                            CT  .  <  (  +  !   SP=space
           50   &                             ]  $  *  )  ; NO   CT=cents
           60   -  /          XO              |  ,  %  _  >  ?   NO=not-sign
           70                                 :  #  @  '  =  "   XO=XOR(1)
           80      a  b  c  d  e  f  g  h  i
           90      j  k  l  m  n  o  p  q  r        {     [
           a0      ~  s  t  u  v  w  x  y  z                RE   RE=registered
           b0   ^ PO       CO                                    PO=pound
           c0      A  B  C  D  E  F  G  H  I                     CO=copyright
           d0      J  K  L  M  N  O  P  Q  R        }     \
           e0         S  T  U  V  W  X  Y  Z
           f0   0  1  2  3  4  5  6  7  8  9                DE   DE=delete

       (1) The symbol for the INTERCAL XOR operator, "V overstrike -".

Name

       Charset::EBCDIC - convert between INTERCAL variant of EBCDIC and ASCII

See Also

       A qualified psychiatrist.

perl v5.40.0                                       2025-02-09                     INTERCAL::Charset::EBCDIC(3pm)

Synopsis

           use Charset::EBCDIC 'ascii2abcdic';

           my $a = ebcdic2ascii "(EBCDIC text)";

See Also