文本文件编码查看 以及转换 enca
【摘要】
[xushx@ workspace]file GX3001Q_xushx__V1_1025.txt(该文件来自于内网) GX3001Q_xushx__V1_1025.txt: ISO-8859 text, with no line terminators [xushx@ workspace]enca GX3001Q_xushx__V1_...
[xushx@ workspace]file GX3001Q_xushx__V1_1025.txt(该文件来自于内网)
GX3001Q_xushx__V1_1025.txt: ISO-8859 text, with no line terminators
[xushx@ workspace]enca GX3001Q_xushx__V1_1025.txt
Simplified Chinese National Standard; GB2312
[xushx@ workspace]vi GX3001Q_xushx__V1_1025.txt
[xushx@ workspace]enca -L zh_CN GX3001Q_xushx__V1_1025.txt
Simplified Chinese National Standard; GB2312
[xushx@ workspace]enca -x UTF-8 GX3001Q_xushx__V1_1025.txt
[xushx@ workspace]enca GX3001Q_xushx__V1_1025.txt
Universal transformation format 8 bits; UTF-8
[xushx@ workspace]vi GX3001Q_xushx__V1_1025.txt
[xushx@ workspace]vi GX3001Q_xushx__V1_1025.txt
[xushx@ workspace]enca -x GB2312 GX3001Q_xushx__V1_1025.txt
[xushx@ workspace]vi GX3001Q_xushx__V1_1025.txt
[xushx@ workspace]enca GX3001Q_xushx__V1_1025.txt
Simplified Chinese National Standard; GB2312
GX3001Q_xushx__V1_1025.txt: ISO-8859 text, with no line terminators
[xushx@ workspace]enca GX3001Q_xushx__V1_1025.txt
Simplified Chinese National Standard; GB2312
[xushx@ workspace]vi GX3001Q_xushx__V1_1025.txt
[xushx@ workspace]enca -L zh_CN GX3001Q_xushx__V1_1025.txt
Simplified Chinese National Standard; GB2312
[xushx@ workspace]enca -x UTF-8 GX3001Q_xushx__V1_1025.txt
[xushx@ workspace]enca GX3001Q_xushx__V1_1025.txt
Universal transformation format 8 bits; UTF-8
[xushx@ workspace]vi GX3001Q_xushx__V1_1025.txt
[xushx@ workspace]vi GX3001Q_xushx__V1_1025.txt
[xushx@ workspace]enca -x GB2312 GX3001Q_xushx__V1_1025.txt
[xushx@ workspace]vi GX3001Q_xushx__V1_1025.txt
[xushx@ workspace]enca GX3001Q_xushx__V1_1025.txt
Simplified Chinese National Standard; GB2312
enca file_name 查看文本文件编码
enca -x 编码 filename 转换文件编码
enca -x GB2312 GX3001Q_xushx__V1_1025.txt
enca -x UTF-8 < file1> file2 如果不想覆盖原文件可以这样
[xushx@ workspace]enca -f hh.txt
Simplified Chinese National Standard; GB2312
[xushx@ workspace]enca -c hh.txt //-c自动转换编码为系统默认编码(UTF-8)
[xushx@ workspace]enca -d hh.txt
hh.txt: Universal transformation format 8 bits; UTF-8
文章来源: blog.csdn.net,作者:悟空胆好小,版权归原作者所有,如需转载,请联系作者。
原文链接:blog.csdn.net/xushx_bigbear/article/details/13016867
【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)