文件编码格式转换
由于GWT(Google Web Toolkit)需要utf-8编码的源代码(采用gbk会乱码),因此决定将所有的java文件encoding改为utf-8.转换方法:ant
build.xml
<project name="encoding" default="build"> <target name="build"> <copy todir="e:/output" outputencoding="utf-8"> <fileset dir="."> <include name="**/*.java"/> </fileset> </copy> </target></project>
先把源代码全部用utf-8格式拷贝到e:/output,然后再把output中的所有文件拷贝到原先的地方就可以.
Eclipse的菜单 Windows\Preferences\Workspace\Text file encoding 改成 utf-8
页:
[1]