Java : How to determine the correct charset encoding of a stream

前端 未结 15 1904
花落未央
花落未央 2020-11-22 02:06

With reference to the following thread: Java App : Unable to read iso-8859-1 encoded file correctly

What is the best way to programatically determine the correct cha

15条回答
  •  没有蜡笔的小新
    2020-11-22 02:24

    I found a nice third party library which can detect actual encoding: http://glaforge.free.fr/wiki/index.php?wiki=GuessEncoding

    I didn't test it extensively but it seems to work.

提交回复
热议问题