1. 首页
  2. 编程语言
  3. Java
  4. cpdetector_1.0

cpdetector_1.0

上传者: 2020-06-16 16:04:27上传 ZIP文件 471.11KB 热度 16次
cpdetector是一个可以自动检测文本编码格式的项目。detector按照“谁最先返回非空的探测结果,就以该结果为准”的原则返回探测到的字符集编码。使用需要用到三个第三方JAR包:antlr.jar、chardet.jar和cpdetector.jarcpDetector是基于统计学原理的,不保证完全正确。 使用实例: publicvoidguessEncoding()throwsMalformedURLException,IOException{ Stringfilepath="C:/ProgramFiles/a.java"; CharsetPrinte
下载地址
用户评论