1.修改workspace編碼
windows->preferences->gengral->workspace
選擇other->UTF-8。
2.修改Content Types編碼
windows->preferences->gengral->conten Types->Text
Default enconding–>UTF-8–>Update(這樣把里面所有的文件設置為UTF-8編碼)
3.修改web下文件的編碼
windows->preferences->web->(css files、html files、javaServer face、jsp files)
在enconding設置為ISO 10646/Unicode(UTF-8)
4.修改項目的編碼,對於導入的項目,包,類也可以單獨去配設置
右鍵》properties》Resource
testNG中文亂碼
項目右鍵》Run as 》Run Configurations