acheronfail / repgrep

An interactive replacer for ripgrep that makes it easy to find and replace across files on the command line.
Apache License 2.0
267 stars 4 forks source link

Add support for the same encodings that ripgrep supports #12

Closed acheronfail closed 1 year ago

acheronfail commented 4 years ago

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:

Supported encodings (tests exist for them):

acheronfail commented 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!

acheronfail commented 1 year ago

We can improve the encoding situation for rgr by contributing an upstream change in rg, see: https://github.com/BurntSushi/ripgrep/issues/1629