grep Unicode 16 支持

tou*_*ker 5 linux unicode grep utf-8 utf-16

我在 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)

hmo*_*liu 5

iconv -f UTF-16 -t UTF-8 yourfile | grep xxx
Run Code Online (Sandbox Code Playgroud)