|
From: | Paul Eggert |
Subject: | bug#18266: Bug#758105: bug#18266: grep -P and invalid exits with error |
Date: | Thu, 14 Aug 2014 11:19:28 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 |
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.
[Prev in Thread] | Current Thread | [Next in Thread] |