diff --git a/ChangeLog b/ChangeLog index d041688..7127feb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 -------------------------- diff --git a/src/pcre2_substitute.c b/src/pcre2_substitute.c index 7cd8ccf..0c1979e 100644 --- a/src/pcre2_substitute.c +++ b/src/pcre2_substitute.c @@ -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