Use PCRE2_NO_UTF_CHECK for the second and subsequent matches in

pcre2_substitute().
This commit is contained in:
ph10 2015-10-30 17:41:56 +00:00
parent f99f7ee6a1
commit 9ae39fd4aa
2 changed files with 7 additions and 0 deletions

View File

@ -233,6 +233,9 @@ misbehave.
replacement string was happening before the length setting when the replacement
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
--------------------------

View File

@ -279,6 +279,10 @@ do
rc = pcre2_match(code, subject, length, start_offset, options|goptions,
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
doing the special after-empty-match global rematch, or when at the end of the