summaryrefslogtreecommitdiff
path: root/utf8.h
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2012-09-16 10:58:26 -0600
committerKarl Williamson <public@khwilliamson.com>2012-09-16 22:31:23 -0600
commit7b4252f49b5cd844c918f7f2cb81e064d4377ba9 (patch)
treefa840dbd1c86d9564ff29c0677a39804ad1e7c50 /utf8.h
parent0cd39adf63bbc345adf2626353dca017ce526563 (diff)
downloadperl-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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/utf8.h b/utf8.h
index bf8251a7ce..30537a88db 100644
--- a/utf8.h
+++ b/utf8.h
@@ -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))))