INTERC...lerith(3pm)
β¨ NAME β¨
Charset::Hollerith β the icon that converts between the INTERCAL variant of Hollerith and ASCII π
πΈ SYNOPSIS πΈ
use Charset::Hollerith qw(hollerith2ascii);
my $a = hollerith2ascii "(Hollerith text)";
π¦ DESCRIPTION π¦
So Charset::Hollerith defines functions that convert between a subset of ASCII and a subset of nonstandard Hollerith. And bestie, yes β nonstandard is doing a lot of work in that sentence, because there is literally no such thing as a standard Hollerith. So we made our own variant π and it is guaranteed to be incompatible with all versions of Hollerith used by IBM hardware. Not a bug, a lifestyle.
That said, for each character code we used the code that some (but not all) IBM card reader used, if that code exists in Hollerith at all β or we made one up in some logical way (like overpunching) when no IBM hardware had that particular character. Slay, honestly. π
The two functions hollerith2ascii and ascii2hollerith are exportable but not exported by default. They do the obvious thing to their argument. That's it, that's the whole vibe check. β¨
π HOLLERITH CHARACTER TABLE π
Okay so a Hollerith string is a sequence of 12-bit characters; they're encoded as two ASCII characters, each containing 6 bits:
- the first character contains punches
12,0,2,4,6,8 - the second character contains punches
11,1,3,5,7,9 - interleaving the two characters gives you the original 12 bits π§
To make the characters printable on ASCII terminals, bit 7 is always set to 0, and bit 6 is set to the complement of bit 5. These two bits are ignored when reading Hollerith cards. iykyk.
Some Hollerith characters (the ones produced by overpunching) can be converted to sequences of ASCII characters; ascii2hollerith will correctly recognise the sequences. No cap.
The following punched cards document the encoding of characters; the last card ends with nongraphic symbols in ASCII so the column heading contains a two-letter abbreviation instead, and with the two overpunch symbols we use, change and bookworm, whose column heading shows the two characters, "C/" and "V-" respectively:
' !"#$%&()*+,-./:;<=>?@[\]^_`{|}~0123456789
12 * * * * * * * * * 12
11 * * * * ** ** * * 11
0 * * * * **** * * * 0
1 * * 1
2 * * * * * 2
3 ** * * * 3
4 *** * * ** * * * * 4
5 * * * * * 5
6 * * ** * * 6
7 * *** * * 7
8 * ******** * * ******* * * * * * 8
9 * * * 9
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrs
12 ********* ********* 12
11 ********* ********* 11
0 ********* * * 0
1 * * ** ** * 1
2 * * * ** ** * 2
3 * * * ** ** 3
4 * * * ** ** 4
5 * * * ** ** 5
6 * * * ** ** 6
7 * * * ** ** 7
8 * * * ** ** 8
9 * * * * * 9
tuvwxyz [] ". NL CR HT C/ V-
12 * * * * 12
11 * * 11
0 ******* * * * * 0
1 * * * * 1
2 * * * * 2
3 ** * * * * * 3
4 ** * * * * 4
5 ** * * * * 5
6 ** * * * 6
7 ** * * * * * 7
8 ** * * * * 8
9 * * * * 9
PLEASE NOTE that versions of CLC-INTERCAL before1.-94.-2had a bug which caused a rabbit to be represented as12-3-2-8instead of12-3-7-8. Cards punched with such older versions, and containing rabbits, will need to be copied with one of the rabbit holes moved from row2to row7. ππ seriously, do not skip this one.
π COPYRIGHT π
This module is part of CLC-INTERCAL.
Copyright (C) 2000, 2002, 2006, 2007 Claudio Calvelli, all rights reserved
See the files README and COPYING in the distribution for information.
π SEE ALSO π
A qualified psychiatrist. ποΈπ
okay that's the whole page bestie, go forth and punch some cards π β this was perl v5.40.0, dated 2025-02-09, from the INTERC...lerith(3pm) manual, and honestly? iconic. periodt. πβ¨
π¦ 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