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

后端 未结 5 736
我寻月下人不归
我寻月下人不归 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条回答
  •  醉话见心
    2020-12-15 18:10

    You should set the same page in many places:

    1. in Ant Script javac encoding="UTF-8" ... /
    2. -Dfile.encoding=UTF-8 in parameters of Ant calling
    3. In file-properties-resource-encoding - again choose the same page. You can also change it for all files in the container by the IDE (preferences for Eclipse). Then make all files to inherit it from the container.

    4. If some files were created in wrong encoding, rework their content through PsPad or maybe, another text editor (copy-paste, change file encoding, back copy-paste). These files will be mentioned in unmappable character errors.

    After setting all these four problems you will have NO unmappable character lines.

提交回复
热议问题