|
From: | Paul Eggert |
Subject: | bug#18266: grep -P and invalid exits with error |
Date: | Fri, 29 Aug 2014 06:43:45 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 |
Also, I don't see why grep needs to copy the buffer when there's an encoding error. Why not simply rerun the matcher on the initial prefix that doesn't have an encoding-error byte, and then (if that doesn't find a match), try matching the suffix after the encoding-error byte? This approach would not only avoid the buffer copy, it would avoid knowledge of libpcre internals.
[Prev in Thread] | Current Thread | [Next in Thread] |