findstr or grep that autodetects chararacter encoding (UTF-16)

后端 未结 7 1209
遥遥无期
遥遥无期 2021-01-04 08:34

I want to do this:

 findstr /s /c:some-symbol *

or the grep equivalent

 grep -R some-symbol *

but I need

7条回答
  •  长发绾君心
    2021-01-04 09:23

    You didn't say which platform you want to do this on.

    On Windows, you could use PowerGREP, which automatically detects Unicode files that start with a byte order mark. (There's also an option to auto-detect files without a BOM. The auto-detection is very reliable for UTF-8, but limited for UTF-16.)

提交回复
热议问题