Control:  tags 730472 confirmed

On Mon, Nov 25, 2013 at 12:27:23PM +0100, Vincent Lefevre wrote:
> Package: grep
> Version: 2.15-1
> Severity: important
> 
> The -P option no longer works: I get
> 
>   "invalid UTF-8 byte sequence in input"
> 
> errors with it.
> 
> $ grep -r blah .
> $ grep -r -P blah .
> grep: invalid UTF-8 byte sequence in input
> 

Thanks for you report. 

Indeed, grep -P and UTF-8 are not happy with non-valid UTF-8 inputs.

This works:

$ printf 'ñ' |  LC_ALL=fr_FR.UTF-8 grep -P 'ñ'
ñ

This reports error:

$ echo 'ñ' > /tmp/test 
$ LC_ALL=fr_FR.UTF-8 grep -P -r 'ñ' /tmp/
/tmp/test:ñ
grep: invalid UTF-8 byte sequence in input

But it works if I don't use UTF-8

LC_ALL=C grep -P -r 'ñ' /tmp/
/tmp/test:ñ
Binary file /tmp/tmp54ca5e73.tmp matches
...

I'll work on it as soon as possible.

Best regards,

Santiago


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to