1.修改workspace编码

windows->preferences->gengral->workspace

选择other->UTF-8。

eclipse设置UTF-8

 

 2.修改Content Types编码

windows->preferences->gengral->conten Types->Text

Default enconding–>UTF-8–>Update(这样把里面所有的文件设置为UTF-8编码)eclipse设置UTF-8

 

 3.修改web下文件的编码

windows->preferences->web->(css files、html files、javaServer face、jsp files)

在enconding设置为ISO 10646/Unicode(UTF-8)

eclipse设置UTF-8

 

 4.修改项目的编码,对于导入的项目,包,类也可以单独去配设置

右键》properties》Resource

eclipse设置UTF-8

 testNG中文乱码

 

eclipse设置UTF-8

 

 

 

项目右键》Run as 》Run Configurations

eclipse设置UTF-8

 

相关文章:

  • 2021-11-30
  • 2021-11-20
  • 2021-10-24
  • 2021-11-03
  • 2021-12-29
  • 2021-12-08
  • 2021-11-28
  • 2021-12-27
猜你喜欢
  • 2021-10-05
  • 2021-11-03
  • 2021-11-20
  • 2021-10-05
  • 2021-11-02
  • 2021-09-25
  • 2021-11-03
相关资源
相似解决方案