This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
PATCH [perl #74978] dot after } breaks \N{}
[perl5.git] / utf8.h
diff --git a/utf8.h b/utf8.h
index 8fef274..8765336 100644 (file)
--- a/utf8.h
+++ b/utf8.h
@@ -72,17 +72,17 @@ END_EXTERN_C
  Code Points           1st Byte  2nd Byte  3rd Byte  4th Byte
 
    U+0000..U+007F      00..7F
-   U+0080..U+07FF      C2..DF    80..BF
+   U+0080..U+07FF     * C2..DF    80..BF
    U+0800..U+0FFF      E0      * A0..BF    80..BF
    U+1000..U+CFFF       E1..EC    80..BF    80..BF
-   U+D000..U+D7FF       ED      * 80..9F    80..BF
+   U+D000..U+D7FF       ED        80..9F    80..BF
    U+D800..U+DFFF       +++++++ utf16 surrogates, not legal utf8 +++++++
    U+E000..U+FFFF       EE..EF    80..BF    80..BF
   U+10000..U+3FFFF     F0      * 90..BF    80..BF    80..BF
   U+40000..U+FFFFF     F1..F3    80..BF    80..BF    80..BF
  U+100000..U+10FFFF    F4        80..8F    80..BF    80..BF
 
-Note the gaps before the 2nd Byte entries above marked by '*'.  These are
+Note the gaps before several of the byte entries above marked by '*'.  These are
 caused by legal UTF-8 avoiding non-shortest encodings: it is technically
 possible to UTF-8-encode a single code point in different ways, but that is
 explicitly forbidden, and the shortest possible encoding should always be used
@@ -101,7 +101,7 @@ explicitly forbidden, and the shortest possible encoding should always be used
   00000dddccccccbbbbbbaaaaaa     11110ddd  10cccccc  10bbbbbb  10aaaaaa
 
 As you can see, the continuation bytes all begin with C<10>, and the
-leading bits of the start byte tell how many bytes the are in the
+leading bits of the start byte tell how many bytes there are in the
 encoded character.
 
 */
@@ -206,7 +206,7 @@ encoded character.
 
 #define IN_BYTES (CopHINTS_get(PL_curcop) & HINT_BYTES)
 #define DO_UTF8(sv) (SvUTF8(sv) && !IN_BYTES)
-#define IN_UNI_8_BIT ( (! (CopHINTS_get(PL_curcop) & HINT_NOT_UNI_8_BIT)) \
+#define IN_UNI_8_BIT ( (CopHINTS_get(PL_curcop) & HINT_UNI_8_BIT) \
                        && ! IN_LOCALE_RUNTIME && ! IN_BYTES)
 
 #define UTF8_ALLOW_EMPTY               0x0001