Skip to content

doc: document limitations with PCRE2_MATCH_INVALID_UTF #188

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/pcre2api.3
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions doc/pcre2unicode.3
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down