Use PCRE2_NO_UTF_CHECK for the second and subsequent matches in
pcre2_substitute().
This commit is contained in:
parent
efccea98f1
commit
890250535b
|
@ -233,6 +233,9 @@ misbehave.
|
||||||
replacement string was happening before the length setting when the replacement
|
replacement string was happening before the length setting when the replacement
|
||||||
string was zero-terminated.
|
string was zero-terminated.
|
||||||
|
|
||||||
|
68. In pcre2_substitute() in UTF mode, PCRE2_NO_UTF_CHECK can be set for the
|
||||||
|
second and subsequent calls to pcre2_match().
|
||||||
|
|
||||||
|
|
||||||
Version 10.20 30-June-2015
|
Version 10.20 30-June-2015
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
|
@ -279,6 +279,10 @@ do
|
||||||
|
|
||||||
rc = pcre2_match(code, subject, length, start_offset, options|goptions,
|
rc = pcre2_match(code, subject, length, start_offset, options|goptions,
|
||||||
match_data, mcontext);
|
match_data, mcontext);
|
||||||
|
|
||||||
|
#ifdef SUPPORT_UNICODE
|
||||||
|
if (utf) options |= PCRE2_NO_UTF_CHECK; /* Only need to check once */
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Any error other than no match returns the error code. No match when not
|
/* Any error other than no match returns the error code. No match when not
|
||||||
doing the special after-empty-match global rematch, or when at the end of the
|
doing the special after-empty-match global rematch, or when at the end of the
|
||||||
|
|
Loading…
Reference in New Issue