This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Replace wrong tr/// table in perlebcdic.pod
authorKarl Williamson <khw@khw-desktop.(none)>
Tue, 18 May 2010 14:43:31 +0000 (08:43 -0600)
committerRafael Garcia-Suarez <rgs@consttype.org>
Tue, 25 May 2010 10:30:48 +0000 (12:30 +0200)
commit5f26d5fd39994d2ecb568aeb7efdba685fe9a350
treea51a7973264478372c812602249f7e993870605c
parent8590c068107627f63321a9736653a498cadf3a27
Replace wrong tr/// table in perlebcdic.pod

perlebcdic.pod contains a helpful table to use in tr/// to convert
between EBCDIC and Latin1/ASCII.  Unfortunately, the table is the
inverse of the one it describes, as I discovered in following the
directions on how it was extracted.

The actual code that uses the table uses it in the inverse way, so it
actually works correctly, but if you follow the instructions to get the
tables corresponding to the other recognized code pages, you will get
the inverse of the ones you wanted, and things won't work out.

This patch changes the table to its inverse, and changes the sample code
to correspond, as this is easier for the person trying to follow the
instructions since deriving the old table is somewhat more complicated.

I also changed the table to hex from octal, as that is more the norm
these days, and I changed to recipes in the pod to print out leading
zeros to make all the values the same length, as the table that they can
generate has them.
pod/perlebcdic.pod