grep unicode 16支持 [英] grep unicode 16 support

查看:161
本文介绍了grep unicode 16支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在macosx上使用TextEdit创建了两个文件,相同的内容具有不同的编码,然后

I use TextEdit on macosx created two files, same contents with different encodings, then

grep xxx filename_UTF-16

没事

grep xxx filename_UTF-8

xxxxxxx xxxxxxyyyyyy

xxxxxxx xxxxxxyyyyyy

grep did not support UTF-16?

推荐答案

iconv -f UTF-16 -t UTF-8 yourfile | grep xxx

这篇关于grep unicode 16支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆