diff --git a/doc/pcre2api.3 b/doc/pcre2api.3 index 28c6033a1..877d8db0a 100644 --- a/doc/pcre2api.3 +++ b/doc/pcre2api.3 @@ -1615,6 +1615,7 @@ PCRE2_EXTRA_MATCH_WORD are also supported. Any other options cause an error. .sp This option forces PCRE2_UTF (see below) and also enables support for matching by \fBpcre2_match()\fP in subject strings that contain invalid UTF sequences. +(Assuming the matching text is suitably aligned). This facility is not supported for DFA matching. For details, see the .\" HREF \fBpcre2unicode\fP diff --git a/doc/pcre2unicode.3 b/doc/pcre2unicode.3 index e7e37a395..fa32b5f35 100644 --- a/doc/pcre2unicode.3 +++ b/doc/pcre2unicode.3 @@ -442,6 +442,10 @@ would match an instance of WORD that is surrounded by invalid UTF code units. Using PCRE2_MATCH_INVALID_UTF, an application can run matches on arbitrary data, knowing that any matched strings that are returned are valid UTF. This can be useful when searching for UTF text in executable or other binary files. +.P +The test for validity of Unicode characters is done for whole code units, so +if the valid Unicode string is not aligned to a multiple of the code point size +it won't be identified as valid. . . .SH AUTHOR