您的位置:首页 > 其它

文本文件编码查看 以及转换 enca

2013-10-25 10:36 162 查看
[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

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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: