summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2019-01-26 13:55:17 -0500
committerAndrew Gallant <jamslam@gmail.com>2019-01-26 13:55:47 -0500
commit6d5dba85bd455c348655c3f91347989abb160cd4 (patch)
tree4414b8e33321195c23aa00e1b79dc38d93ac827b /src
parentafb89bcdadf85d9c721739d004552ed3c8a9afa0 (diff)
doc: clarify automatic encoding detection
Fixes #1103
Diffstat (limited to 'src')
-rw-r--r--src/app.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/app.rs b/src/app.rs
index 59fd6f23..b4c81a7c 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -982,10 +982,15 @@ fn flag_encoding(args: &mut Vec<RGArg>) {
const LONG: &str = long!("\
Specify the text encoding that ripgrep will use on all files searched. The
default value is 'auto', which will cause ripgrep to do a best effort automatic
-detection of encoding on a per-file basis. Other supported values can be found
-in the list of labels here:
+detection of encoding on a per-file basis. Automatic detection in this case
+only applies to files that begin with a UTF-8 or UTF-16 byte-order mark (BOM).
+No other automatic detection is performend.
+
+Other supported values can be found in the list of labels here:
https://encoding.spec.whatwg.org/#concept-encoding-get
+For more details on encoding and how ripgrep deals with it, see GUIDE.md.
+
This flag can be disabled with --no-encoding.
");
let arg = RGArg::flag("encoding", "ENCODING").short("E")