This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
utf8.c: Reorder some tests
authorKarl Williamson <khw@cpan.org>
Mon, 7 Dec 2015 04:32:28 +0000 (21:32 -0700)
committerKarl Williamson <khw@cpan.org>
Wed, 9 Dec 2015 02:01:28 +0000 (19:01 -0700)
commit3ea68d7190b5afecdfa8a74b5c49ea1c5dcb53f8
treec9dd7ab564221226fc697b50eb2bb2a86aeccfd5
parentc149ab205d3bc5f4d0fc870f24a2a61d78f162a6
utf8.c: Reorder some tests

When converting a code point to its UTF-8 form, the code point is
checked to be sure it is not problematic.  It turns out that all
problematic code points require at least 3 UTF-8 bytes to represent.
Already, the single-byte characters are handled before the problematic
tests.  This changes so that the two-byte ones are as well.  Further, it
now uses the canned macros that do this which are valid on both EBCDIC
and ASCII systems, instead of the previous code, which was
ASCII-specific.  This means one less test when the input code point is
representable by 2 bytes.
utf8.c