GNU bug report logs - #18266
grep -P and invalid exits with error

Previous Next

Package: grep;

Reported by: Santiago <santiago <at> debian.org>

Date: Thu, 14 Aug 2014 15:43:02 UTC

Severity: wishlist

Merged with 18455

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #16 received at 18266 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Vincent Lefevre <vincent <at> vinc17.net>, 758105 <at> bugs.debian.org
Cc: Santiago <santiago <at> debian.org>, 18266 <at> debbugs.gnu.org
Subject: Re: Bug#758105: bug#18266: grep -P and invalid exits with error
Date: Thu, 14 Aug 2014 11:19:28 -0700
Vincent Lefevre wrote:

> it would be better to replace invalid UTF-8 sequences by
> zero bytes before passing them to libpcre. Is it allowed to do
> that in Pexecute()?

Sorry, I don't know.  I was hoping that the volunteer (whoever it is) 
could figure all this stuff out.

grep should work correctly even if the input contains NUL bytes, so 
perhaps it would be better to replace an invalid byte by the UTF-8 
sequence for U+FFFD REPLACEMENT CHARACTER, as that's one standard way to 
deal with this problem.  Or perhaps the volunteer will have a better idea.




This bug report was last modified 10 years and 248 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.