INTERC...:EBCDIC(3pm)

πŸ“¦
version 1.00 Β· 4 versions
, in debian trixie, ubuntu questing

πŸ’– INTERC...:EBCDIC β€” bestie edition πŸ’–

okay so this is Charset::EBCDIC, a Perl module (it lives in the 3pm section of the manual, iykyk) and honestly? it's giving "we made up our own EBCDIC and we're not sorry". let's get into it 🫢


✨ NAME ✨

Charset::EBCDIC β€” convert between the INTERCAL variant of EBCDIC and ASCII πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

use Charset::EBCDIC 'ascii2abcdic';

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

periodt. that's the whole vibe check right there ✨


🌸 DESCRIPTION 🌸

so Charset::EBCDIC defines functions that convert between a subset of ASCII and a subset of nonstandard EBCDIC. and bestie, "nonstandard" is doing SO much work in that sentence β€” because there isn't actually such a thing as a standard EBCDIC, the authors just defined their own variant 😭 and they are guaranteed to be incompatible with every single version of EBCDIC that IBM hardware uses. iconic behaviour, honestly.

BUT β€” and this is the part that ate β€” whenever they picked a code for a character, they made sure that at least one IBM model used that same code. not all of them! definitely not all of them. but at least one. so you literally cannot criticise the choice. πŸ’€ no cap.

if you really want to know (and like, valid), several variants of EBCDIC are listed in RFC 1345, which is available from the usual sources. 🌈

Two functions β€” ebcdic2ascii and ascii2ebcdic β€” are exportable, but they are not exported by default. they do the obvious thing to their first argument and return the transformed string. simple as. πŸŽ€


πŸ‘‘ EBCDIC CHARACTER TABLE πŸ‘‘

here's every character that's recognised. the ones shown as 2 letter abbreviations cannot be translated to ASCII β€” except for the control characters, which do have an ASCII equivalent. keep that in mind bestie πŸ™ˆ

 +   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) that's the symbol for the INTERCAL XOR operator, "V overstrike -". yes, overstrike. it's giving 1960s mainframe realness ⭐


this module is part of CLC-INTERCAL. 🫢

Copyright (C) 1999, 2000, 2002, 2006, 2007 Claudio Calvelli, all rights reserved.

see the files README and COPYING in the distribution for the info. ✨


πŸ”₯ SEE ALSO πŸ”₯

A qualified psychiatrist. 🧚


okay bestie that's the whole page πŸ’– this was perl v5.40.0, dated 2025-02-09, and it came from the User Contributed Perl Documentation collection, filed under INTERC...:EBCDIC(3pm). go forth and convert some wildly nonstandard character encodings, you absolute main character πŸŒˆπŸ‘‘πŸ’…

πŸ“¦ where this page comes from