解决Android WebView 乱码问题

xiaoxiao2021-02-27  368

1. 设置网页编码格式    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">

 2.设置WebView编码   httpview.getSettings().setDefaultTextEncodingName("utf-8");

 3.调用 previewBlogWv.loadDataWithBaseURL("",content,"text/html","utf-8","");

 

转载请注明原文地址: https://www.6miu.com/read-4459.html

最新回复(0)