cli: improve invalid UTF-8 pattern error message

When a pattern with invalid UTF-8 is given, the error message suggests
unqualified use of hex escape sequences to match arbitrary bytes. But
you *also* need to disable Unicode mode. So include that in the error
message.

Fixes #1339
This commit is contained in:
Andrew Gallant
2020-05-08 08:53:41 -04:00
parent 50840ea43b
commit 64a4dee495
2 changed files with 6 additions and 7 deletions

View File

@@ -2,6 +2,8 @@ TBD
===
Bug fixes:
* [BUG #1339](https://github.com/BurntSushi/ripgrep/issues/1339):
Improve error message when a pattern with invalid UTF-8 is provided.
* [BUG #1524](https://github.com/BurntSushi/ripgrep/issues/1524):
Note how to escape a `$` when using `--replace`.
* [BUG #1537](https://github.com/BurntSushi/ripgrep/issues/1537):