如何在windows中更改默认的系统java编码格式?

问题描述:

当我尝试编译(使用javac)时,一些java源文件包含一个注释行,其中包含一些无法识别的字符,如ascii代码129(~A),错误得到。

When I tried to compile (use javac)some java sources files include a comment line which has some unrecognized char like ascii code 129 (~A), error got.

源代码如下所示:

 // ascii 129 is ? (Acutally it show ~A in VIM but show ? when I directly copy it here)

上面的代码line是注释,它不应该导致任何错误,但如果确实如此,我认为这应该是关于jave编码形式的问题,我该如何解决这个问题呢?

The above code line is a comment, it should not cause any error, but if it did, I think it should be a problem about the jave encode form, how can I solve this problem?

谢谢。

Wa

看看这个回答。它对我有用,我不必再担心它了:) https://stackoverflow.com/a/623036/ 971592

Take a look at this answer. It worked for me, and I don't have to worry about it anymore :) https://stackoverflow.com/a/623036/971592