如何确定文件编码 [英] How to determine a file Encoding

查看:82
本文介绍了如何确定文件编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何确定文件编码?

推荐答案

现代文本文件在文件的开头具有二进制标记.您可以读取文件的前4个字节,然后在此处从表中查找编码:

http://en.wikipedia.org/wiki/Byte_order_mark [
Modern text files have a binary tag at the front of the file. You can read the first 4 bytes of a file and then look up the encoding from the table here:

http://en.wikipedia.org/wiki/Byte_order_mark[^]


这篇关于如何确定文件编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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