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

前端 未结 15 1653
花落未央
花落未央 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:22

    Can you pick the appropriate char set in the Constructor:

    new InputStreamReader(new FileInputStream(in), "ISO8859_1");
    

提交回复
热议问题