diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-09-16 10:58:26 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-09-16 22:31:23 -0600 |
commit | 7b4252f49b5cd844c918f7f2cb81e064d4377ba9 (patch) | |
tree | fa840dbd1c86d9564ff29c0677a39804ad1e7c50 /utf8.h | |
parent | 0cd39adf63bbc345adf2626353dca017ce526563 (diff) | |
download | perl-7b4252f49b5cd844c918f7f2cb81e064d4377ba9.tar.gz |
utf8.h: Add macro to test if UTF8 code point isn't Latin1
Diffstat (limited to 'utf8.h')
-rw-r--r-- | utf8.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -170,6 +170,7 @@ Perl's extended UTF-8 means we can have start bytes up to FF. /* Masking with 0xfe allows low bit to be 0 or 1; thus this matches 0xc[23] */ #define UTF8_IS_DOWNGRADEABLE_START(c) (((U8)c & 0xfe) == 0xc2) +#define UTF8_IS_ABOVE_LATIN1(c) ((U8)(c) >= 0xc4) #define UTF_START_MARK(len) (((len) > 7) ? 0xFF : (0xFE << (7-(len)))) |