Guessing the encoding of text represented as byte[] in Java

后端 未结 7 2162
感动是毒
感动是毒 2020-11-28 07:45

Given an array of bytes representing text in some unknown encoding (usually UTF-8 or ISO-8859-1, but not necessarily so), what is the best way to obtain a guess for the most

7条回答
  •  不知归路
    2020-11-28 08:15

    Should be stuff already available

    google search turned up icu4j

    or

    http://jchardet.sourceforge.net/

提交回复
热议问题