Ævar Arnfjörð Bjarmason [off-list ref] writes:
When grepping a non-ASCII fixed string. This is a more general problem
that's hard to fix, but we can at least fix the most common case of
grepping for a fixed string without "-i". I can't think of a reason
for why we'd turn on PCRE2_UTF when matching byte-for-byte like that.
Yes, exactly. That's quite a sane and minimum fix/workaround, I
would think.
test_expect_success GETTEXT_LOCALE,LIBPCRE2 'PCRE v2: grep non-ASCII from invalid UTF-8 data' '
- test_might_fail git grep -h "æ" invalid-0x80 >actual &&
+ git grep -h "æ" invalid-0x80 >actual &&
test_cmp expected actual &&
- test_must_fail git grep -h "(*NO_JIT)æ" invalid-0x80 &&
+ git grep -h "(*NO_JIT)æ" invalid-0x80 &&
test_cmp expected actual
'