This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make cmp() work on EBCDIC with both UTF-8 operands
authorKarl Williamson <khw@cpan.org>
Fri, 4 Sep 2015 00:37:35 +0000 (18:37 -0600)
committerKarl Williamson <khw@cpan.org>
Fri, 4 Sep 2015 01:26:28 +0000 (19:26 -0600)
commitd0664088be143e921b2e717524bafddf6a406029
treec6547719a6bcc03196acdf0ea73adb743e1be917
parent5d508e6c7121fcc91c4072938aec984b2419c773
Make cmp() work on EBCDIC with both UTF-8 operands

Prior to this commit, comparing two UTF-EBCDIC encoded strings did not
work properly, due to the complexities of UTF-EBCDIC in the code point
0-255 range.  This commit adds specialized code to handle this.  The
code could be enabled and work properly on ASCII platforms, but isn't
because a simple memcmp() suffices for these.  Since sort() uses cmp(),
this also fixes UTF-EBCDIC sort.
pod/perldelta.pod
sv.c
t/op/sort.t