How do I detect the encoding of some text?

2019-02-19 10:31发布

How can I identify which format some text is encoded in, either ASCII, Unicode or UTF-8?

标签: encoding
1条回答
仙女界的扛把子
2楼-- · 2019-02-19 10:37

Short answer

There is no guaranteed way to detect the encoding of an arbitrary set of bytes.


Long answer

Ripped from my answer here.


See also

查看更多
登录 后发表回答