在eclipse中java、js、html的中文编码有时候会出现乱码,设置为gbk则可解决。
其中encoding type有三个地方可以设置
1.全局(window-preference-General-workspace)
2.工程(project-properties-resource)
3.文件:选中文件右键(properties-resource)
其中当设置全局文件中content-type (window-preference-general-content type - default encoding)
如果设置这里,那么这一类文件的properties属性中的Text file encoding 为
Default(determined from content type xxx)