How do I set -Dfile.encoding within ant's build.xml?

后端 未结 4 1688
无人共我
无人共我 2020-12-05 04:25

I\'ve got java source files with iso-8859-1 encoding. When I run ant, I get \"warning: unmappable character for encoding UTF-8\". I can avoid this if I run an

4条回答
  •  暖寄归人
    2020-12-05 04:39

    If you've got files encoded in a particular way, it's probably best to tell javac that rather than forcing the whole JVM to use a particular encoding. The javac task has an encoding attribute for this reason.

    
    

    But really, you should just convert the source files to UTF-8. Everything tastes better in UTF-8. :)

提交回复
热议问题