首页
Java
登录
6mi
u
盘
搜
搜 索
Java
android webview 加载乱码
android webview 加载乱码
xiaoxiao
2021-02-27
123
webView.getSettings().setDefaultTextEncodingName("UTF -8");//设置默认为utf-8 webView.loadData(htmlData, "text/html", "UTF -8");//API提供的标准用法,无法解决乱码问题 webView.loadData(htmlData, "text/html; charset=UTF-8", null);//这种写法可以正确解码
转载请注明原文地址: https://www.6miu.com/read-15647.html
技术
最新回复
(
0
)