This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
PL_fold wrong for EBCDIC platforms.
authorKarl Williamson <public@khwilliamson.com>
Fri, 12 Nov 2010 16:05:19 +0000 (09:05 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 22 Nov 2010 21:32:51 +0000 (13:32 -0800)
commitd02f4dad561ba81f934560f8eab051147a45e09e
tree55beb313f848843ad63aca8c05d7162b04686b82
parent6d8e7a01cde4803f9769fb51a041fbd8a839e0b2
PL_fold wrong for EBCDIC platforms.

The PL_fold table map on EBCDIC only works on the ASCII-subrange
characters, not the full native Latin1.

To fix this, I moved the table to utfebcdic.h for EBCDIC platforms, and
actually changed it to three tables, one for each of the code pages
known to Perl.

There is no EBCDIC platform available to test on.  What I did was hack
together a program from existing code that does EBCDIC transforms.  I
ran it in ASCII mode, and verified that the generated table was
identical to the Latin1 table I had previously constructed by hand and
extensively tested.  I then ran it on each of the three EBCDIC
transforms, and verified that each matched the places in the original
table that I knew were correct, all the ASCII alphabetics, the controls,
and a few other code points.

So these tables are at least as correct as the existing one, as they are
identical to it for [A-Z], [a-z].
perl.h
utfebcdic.h