Closed acheronfail closed 1 year ago
I'm going to close this for now.
If you spot any specific encoding issues while using rgr
, please create an issue!
We can improve the encoding situation for rgr
by contributing an upstream change in rg
, see: https://github.com/BurntSushi/ripgrep/issues/1629
We can't trust the
absolute_offset
that ripgrep reports for non UTF-8 encoded files (see https://github.com/BurntSushi/ripgrep/issues/1627#issuecomment-649858419). So we need to parse the file ourselves.Goals for this issue:
Find the exact location of the match a non UTF-8 encoded file, and insert the replacement text in the specified encoding. We changed tactics, but the result is the same. We now decode into UTF8/ASCII, perform the replacements and then re-encode before writing to diskSupported encodings (tests exist for them):
encoding_rs
crate)