Charset.defaultCharset()
and file.encoding
is JVM's charset, not charset of OS, console and terminal.
Now I create a Process
to run a program, and use process.getInputSteam()
to read the output, how to find the correct charset for the process (sun.jnu.encoding
is right but it seems not general)?