This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
utf8.h: Add comment
authorKarl Williamson <khw@cpan.org>
Sun, 29 Jun 2014 03:43:02 +0000 (21:43 -0600)
committerKarl Williamson <khw@cpan.org>
Wed, 9 Jul 2014 14:04:52 +0000 (08:04 -0600)
utf8.h

diff --git a/utf8.h b/utf8.h
index 2357fb0..613389c 100644 (file)
--- a/utf8.h
+++ b/utf8.h
@@ -485,7 +485,9 @@ Perl's extended UTF-8 means we can have start bytes up to FF.
  * U+10FFFF: \xF4\x8F\xBF\xBF  \xF9\xA1\xBF\xBF\xBF    max legal Unicode
  * U+110000: \xF4\x90\x80\x80  \xF9\xA2\xA0\xA0\xA0
  * U+110001: \xF4\x90\x80\x81  \xF9\xA2\xA0\xA0\xA1
- */
+ *
+ * BE AWARE that this test doesn't rule out malformed code points, in
+ * particular overlongs */
 #ifdef EBCDIC /* Both versions assume well-formed UTF8 */
 #   define UTF8_IS_SUPER(s) (NATIVE_UTF8_TO_I8(* (U8*) (s)) >= 0xF9             \
                          && (NATIVE_UTF8_TO_I8(* (U8*) (s)) > 0xF9              \