mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-03-17 20:28:03 +02:00
searcher: add log message noting detected encoding
This helps improve diagnostics. Otherwise it can be easy to miss that ripgrep is doing transcoding. Fixes #2979
This commit is contained in:
parent
d6b59feff8
commit
e2362d4d51
@ -1004,6 +1004,7 @@ fn slice_has_bom(slice: &[u8]) -> bool {
|
||||
None => return false,
|
||||
Some((enc, _)) => enc,
|
||||
};
|
||||
log::trace!("found byte-order mark (BOM) for encoding {enc:?}");
|
||||
[encoding_rs::UTF_16LE, encoding_rs::UTF_16BE, encoding_rs::UTF_8]
|
||||
.contains(&enc)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user