我想做这个:
findstr /s /c:some-symbol *
Run Code Online (Sandbox Code Playgroud)
或grep等价物
grep -R some-symbol *
Run Code Online (Sandbox Code Playgroud)
但我需要该实用程序来自动检测以UTF-16(和朋友)编码的文件并适当地搜索它们.我的文件甚至还有字节排序标记FFEE,所以我甚至都没有寻找英雄的自动检测.
有什么建议?
我指的是Windows Vista和XP.
我在 macosx 上使用 TextEdit 创建了两个文件,相同的内容具有不同的编码,然后
grep xxx filename_UTF-16
Run Code Online (Sandbox Code Playgroud)
没有
grep xxx filename_UTF-8
Run Code Online (Sandbox Code Playgroud)
xxxxxxx xxxxxxyyyyyy
grep did not support UTF-16?
Run Code Online (Sandbox Code Playgroud)