如何检测一些文本的编码? [英] How do I detect the encoding of some text?
本文介绍了如何检测一些文本的编码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何识别一些文本编码的格式,ASCII,Unicode或UTF-8?
How can I identify which format some text is encoded in, either ASCII, Unicode or UTF-8?
推荐答案
短答案
没有保证方式来检测任意一组字节的编码。
Short answer
There is no guaranteed way to detect the encoding of an arbitrary set of bytes.
- 如何检测文本文件的编码/代码页
- Java:如何确定流的正确字符集编码
- 如何可靠地猜测MacRoman,CP1252,Latin1,UTF-8和ASCII之间的编码
- - 仅适用于UTF-8,UTF-16LE,UTF-16BE和UTF-32☹
- ICU字符集检测器
- cpdetector ,免费的java代码页检测
- JCharDet (Mozilla字符集检测器的Java端口) 讽刺的是,该页面不会将撇号 正确
- How can I detect the encoding/codepage of a text file
- Java: How to determine the correct charset encoding of a stream
- How to reliably guess the encoding between MacRoman, CP1252, Latin1, UTF-8, and ASCII
- GuessEncoding - only works for UTF-8, UTF-16LE, UTF-16BE, and UTF-32 ☹
- ICU Charset Detector
- cpdetector, free java codepage detection
- JCharDet (Java port of Mozilla charset detector) ironically, that page does not render the apostrophe in "Mozilla's" correctly
从我的答案中翻转 here 。
- 典型建议: Joel on Software
绝对最小的每个软件开发人员绝对必须了解Unicode和字符集(无借口!) - Unicode是不一个编码。 unicode与utf8有什么区别?
- 此外,您应该阅读如何在Stack Overflow上提出问题:请求帮助
- Typical suggestion: Joel on Software The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)
- "Unicode" is not an encoding. What's the difference between unicode and utf8?
- Also, you should probably read over how to ask questions on Stack Overflow: Asking Help
这篇关于如何检测一些文本的编码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文