-首先检查eclipse中Windown–>perference–>General–>content type–>Test里面default encoding是不是utf-8
-然后在项目右击–>Propety–>Resouce–>Text file coding–>选择 utf-8
-还是中文乱码的话可以用notepad++打开文件,格式–>选择utf-8格式(因为之前有可能是utf-8无BOM格式),保存即可
-首先检查eclipse中Windown–>perference–>General–>content type–>Test里面default encoding是不是utf-8
-然后在项目右击–>Propety–>Resouce–>Text file coding–>选择 utf-8
-还是中文乱码的话可以用notepad++打开文件,格式–>选择utf-8格式(因为之前有可能是utf-8无BOM格式),保存即可