searcher: do UTF-8 BOM sniffing like UTF-16

Previously, we were only looking for the UTF-16 BOM for determining
whether to do transcoding or not. But we should also look for the UTF-8
BOM as well.

Fixes #1638, Closes #1697
This commit is contained in:
Alessandro Menezes
2020-10-02 16:17:39 -04:00
committed by Andrew Gallant
parent 53c4855517
commit 2295061e80
3 changed files with 34 additions and 4 deletions

View File

@@ -54,6 +54,8 @@ Bug fixes:
Fix stdin detection when using PowerShell in UNIX environments.
* [BUG #1765](https://github.com/BurntSushi/ripgrep/issues/1765):
Fix panic when `--crlf` is used in some cases.
* [BUG #1638](https://github.com/BurntSushi/ripgrep/issues/1638):
Correctly sniff UTF-8 and do transcoding, like we do for UTF-16.
* [BUG #1816](https://github.com/BurntSushi/ripgrep/issues/1816):
Add documentation for glob alternate syntax, e.g., `{a,b,..}`.
* [BUG #1847](https://github.com/BurntSushi/ripgrep/issues/1847):