diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-12-21 16:55:38 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-12-21 16:55:38 +0000 |
commit | a18d6e6e4cf998a0ba9067ceac2d75f71aedef15 (patch) | |
tree | 0b3b68d0cdb46f49e3bdd0d7a09c163c9480163f /utf8.h | |
parent | e4dc48dc285e86e786d9f1ca22417ef481b6daff (diff) | |
download | perl-a18d6e6e4cf998a0ba9067ceac2d75f71aedef15.tar.gz |
Fix IS_UTF8_CHAR() to recognise start bytes 0xF5, 0xF6, 0xF7.
The refactoring of 3b0fc154d4e77cfb inadvertently introduced a bug
in Perl_is_utf8_char() and its callers, such as Perl_is_utf8_string(),
whereby the beyond-Unicode characters 0x140000 to 0x1fffff were no longer
recognised as valid.
Diffstat (limited to 'utf8.h')
-rw-r--r-- | utf8.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -343,7 +343,7 @@ Perl's extended UTF-8 means we can have start bytes up to FF. * UTF-8, anyway). The "slow path" in Perl_is_utf8_char() * will take care of the "extended UTF-8". */ #define IS_UTF8_CHAR_4c(p) \ - ((p)[0] == 0xF4 && (p)[0] <= 0xF7 && \ + ((p)[0] >= 0xF4 && (p)[0] <= 0xF7 && \ (p)[1] >= 0x80 && (p)[1] <= 0xBF && \ (p)[2] >= 0x80 && (p)[2] <= 0xBF && \ (p)[3] >= 0x80 && (p)[3] <= 0xBF) |