Java charset and Windows

前端 未结 5 442
广开言路
广开言路 2020-12-10 20:12

I have a Java program that runs msinfo32.exe (system information)in an external process and then reads the file content produced by msinfo32.exe. When the Java program loads

5条回答
  •  一个人的身影
    2020-12-10 21:01

    You can’t really know what character encoding has been used (unless you created the tool that created the output you’re processing). You can try to detect a list of pre-defined encodings and choose the one that does not result in any decoding errors but depending on the input that might match a lot of different encodings.

提交回复
热议问题