doc: transcoding is done in addition to search

Even if transcoding would be faster than search it would still incur
performance penalty. We make this clearer by tweaking the wording.

PR #2079
This commit is contained in:
Mateusz Konieczny 2021-11-22 15:48:42 +01:00 committed by GitHub
parent 7e05cde008
commit 0b36942f68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -648,9 +648,9 @@ given, which is the default:
they correspond to a UTF-16 BOM, then ripgrep will transcode the contents of they correspond to a UTF-16 BOM, then ripgrep will transcode the contents of
the file from UTF-16 to UTF-8, and then execute the search on the transcoded the file from UTF-16 to UTF-8, and then execute the search on the transcoded
version of the file. (This incurs a performance penalty since transcoding version of the file. (This incurs a performance penalty since transcoding
is slower than regex searching.) If the file contains invalid UTF-16, then is needed in addition to regex searching.) If the file contains invalid
the Unicode replacement codepoint is substituted in place of invalid code UTF-16, then the Unicode replacement codepoint is substituted in place of
units. invalid code units.
* To handle other cases, ripgrep provides a `-E/--encoding` flag, which permits * To handle other cases, ripgrep provides a `-E/--encoding` flag, which permits
you to specify an encoding from the you to specify an encoding from the
[Encoding Standard](https://encoding.spec.whatwg.org/#concept-encoding-get). [Encoding Standard](https://encoding.spec.whatwg.org/#concept-encoding-get).