File tree 2 files changed +7
-0
lines changed
2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -1615,6 +1615,7 @@ PCRE2_EXTRA_MATCH_WORD are also supported. Any other options cause an error.
1615
1615
.sp
1616
1616
This option forces PCRE2_UTF (see below) and also enables support for matching
1617
1617
by \fB pcre2_match() \fP in subject strings that contain invalid UTF sequences.
1618
+ (Assuming the matching text is suitably aligned).
1618
1619
This facility is not supported for DFA matching. For details, see the
1619
1620
.\" HREF
1620
1621
\fB pcre2unicode \fP
Original file line number Diff line number Diff line change @@ -442,6 +442,12 @@ would match an instance of WORD that is surrounded by invalid UTF code units.
442
442
Using PCRE2_MATCH_INVALID_UTF, an application can run matches on arbitrary
443
443
data, knowing that any matched strings that are returned are valid UTF. This
444
444
can be useful when searching for UTF text in executable or other binary files.
445
+ .P
446
+ The test for validity of Unicode characters is done for whole code units, so
447
+ if the valid Unicode string is not aligned to a multiple of the code point size
448
+ it won't be identified as valid. If that is a possibility on your data and
449
+ unaligned access is not a problem in your system, you might want to try the
450
+ matches with different starting byte offsets as a work around.
445
451
.
446
452
.
447
453
.SH AUTHOR
You can’t perform that action at this time.
0 commit comments