On 2025-05-06 00:37, Arkadiusz Miśkiewicz via Bug reports for GNU grep
wrote:
Is that expected behavior, no binary file warning and no matching with
utf-8 locale, even with -a?
It's allowed behavior, as '.' need not match encoding errors.[1] Also,
'grep' need not diagnose encoding errors that
Hi.
I was trying to grep logs for some mail log entries and spammer used
0xF3 byte to try to hide / trick things. For grep it looks like this:
$ printf 'a\xF3bcdefgh' > x2
$ LC_ALL=C.UTF-8 grep 'a.*h' x2
$
$ LC_ALL=C grep 'a.*h' x2
abcdefgh
$ LC_ALL=C.UTF-8 grep -a 'a.*h' x2
$
[arekm@ixi