You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I personally expected that ripgrep would strip the UTF8 BOM from the JSON report since that's what it does for UTF16 encodings. However, I'm not sure if this should be the case or not, considering that a UTF8 BOM is an optional file header.
The text was updated successfully, but these errors were encountered:
UTF-8 encoded files with BOM didn't sniff the BOM from results, regardless of
config.bom_sniffing; ripgrep already implemented this option for UTF-16 files
correctly.
FixesBurntSushi#1638
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
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
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
What version of ripgrep are you using?
How did you install ripgrep?
What operating system are you using ripgrep on?
Describe your bug.
When using ripgrep's
--json
flag on a file encoded as "UTF 8 with BOM" the BOM is not accounted for (as opposed to other encodings, such as UTF 16).What are the steps to reproduce the behavior?
UTF8
UTF8 BOM
UTF16
What is the actual behavior?
Here is the JSON output for the above three code blocks.
UTF8
UTF8 BOM
UTF16
What is the expected behavior?
I personally expected that ripgrep would strip the UTF8 BOM from the JSON report since that's what it does for UTF16 encodings. However, I'm not sure if this should be the case or not, considering that a UTF8 BOM is an optional file header.
The text was updated successfully, but these errors were encountered: