summaryrefslogtreecommitdiff
path: root/utfebcdic.h
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-03-02 12:33:42 -0700
committerKarl Williamson <public@khwilliamson.com>2013-08-29 09:56:00 -0600
commite5119cf47e07e212f7b0aabc9adb537b12932666 (patch)
tree14cd71a599cc01a138e55a56b27d00eb559b32ee /utfebcdic.h
parentee372ee9ae7c97db80e5f61d4d6178afe483a803 (diff)
downloadperl-e5119cf47e07e212f7b0aabc9adb537b12932666.tar.gz
utfebcdic.h: Add comment
Diffstat (limited to 'utfebcdic.h')
-rw-r--r--utfebcdic.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/utfebcdic.h b/utfebcdic.h
index 0489621147..6a23433f1e 100644
--- a/utfebcdic.h
+++ b/utfebcdic.h
@@ -719,8 +719,14 @@ END_EXTERN_C
&& NATIVE_UTF8_TO_I8(c) != 0xE0)
#define UTF8_IS_CONTINUATION(c) ((NATIVE_UTF8_TO_I8(c) & 0xE0) == 0xA0)
#define UTF8_IS_CONTINUED(c) (NATIVE_UTF8_TO_I8(c) >= 0xA0)
+
#define UTF8_IS_DOWNGRADEABLE_START(c) (NATIVE_UTF8_TO_I8(c) >= 0xC5 \
&& NATIVE_UTF8_TO_I8(c) <= 0xC7)
+/* Saying it this way adds a runtime test, but removes 2 run-time lookups */
+/*#define UTF8_IS_DOWNGRADEABLE_START(c) ((c) == I8_TO_NATIVE_UTF8(0xC5) \
+ || (c) == I8_TO_NATIVE_UTF8(0xC6) \
+ || (c) == I8_TO_NATIVE_UTF8(0xC7))
+*/
#define UTF8_IS_ABOVE_LATIN1(c) (NATIVE_UTF8_TO_I8(c) >= 0xC8)
/* Can't exceed 7 on EBCDIC platforms */