This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
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.