Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes: > My reading of the situation is slightly different. I think > PCRE_NO_UTF8_CHECK is off by default, but it only makes a difference in > the non-JIT'ed code path. Since we use PCRE2's JIT when possible > (because it leads to a quite nice performance improvement), we usually > don't see those warnings. Carlo's patch makes the non-JIT'ed code path > behave the same as our preferred code path. You're right and we do want to make both codepaths behave the same way. The case we are having trouble with is without JIT, where the machinery to look for needle in a non-UTF8 binary haystack barfs and dies, which is unacceptable (imagine "git log --grep=..."), and we want the machinery to ignore random binary gunk just like the JIT codepath does. Thanks.