1.乱码

webView.getSettings().setDefaultTextEncodingName("UTF -8");//设置默认为utf-8
//webView.loadData(data, "text/html", "UTF -8");//API提供的标准用法,无法解决乱码问题
webView.loadData(data, "text/html; charset=UTF-8", null);//这种写法可以正确解码

 

相关文章:

  • 2021-09-20
  • 2021-11-05
  • 2021-08-19
  • 2021-06-15
  • 2021-08-12
猜你喜欢
  • 2021-07-08
  • 2022-12-23
相关资源
相似解决方案