Ant encoding problem on Windows - UTF-8 files but spits garbage on diacritics

后端 未结 5 737
我寻月下人不归
我寻月下人不归 2020-12-15 17:38

Somehow I can\'t get my UTF-8 sources to play nice with Ant.

I get a whole lot of \"warning: unmappable character for encoding ascii\". I\'m going crazy, really. Hou

5条回答
  •  猫巷女王i
    2020-12-15 18:14

    Just specify encoding in your build.xml script:

    
    

    But for code re-use it's better to extract value into project-specific configuration file:

    
    
    
           
           
                
           
     
    

    And then just add java.encoding=UTF-8 to build.properties to override encoding on per-project basis.

提交回复
热议问题