INTERC...:EBCDIC(3pm)
π 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 β
π COPYRIGHT π
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
- debian trixie: clc-intercal 1:1.00-3
- ubuntu questing: clc-intercal 1:1.00-3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms