最简单的方法是在Build.xml文件中,在所有出现Javac的地方,增加一个选项:encoding=”ISO-8859-1″,例如:

1
2
3
<javac srcdir="${build.src}" destdir="${build.classes}" encoding="ISO-8859-1">
  <classpath refid="classpath.library" />
</javac>

... 源文件,选择字符集“UTF-8″记得是UTF-8,而非“utf-8 bom”。点击批量保存按钮。再运行你的ant脚本,此时编译就不会报出“非法字符:/65279 ...

相关文章:

  • 2021-07-11
  • 2021-06-24
  • 2021-08-07
  • 2021-08-09
猜你喜欢
  • 2021-10-27
  • 2021-07-15
  • 2021-12-01
  • 2022-12-23
  • 2021-04-07
  • 2022-12-23
相关资源
相似解决方案