Subject: Re: Bug#758105: bug#18266: grep -P and invalid exits with error

From: Paul Eggert <[email-masked]>
Date: Thu, 14 Aug 2014 13:13:45 -0700

Vincent Lefevre wrote:
> The problem with this solution is that it would change the length
> of the text, while replacing invalid bytes by zero bytes could be
> done in place (if allowed), with very little change of the code,
> I think.

True.  Though it might be more user-friendly to use '?' as the 
replacement byte.