目的显示这下面的包含中文的文本:
String st="<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"> <title>Insert title here</title> </head> <body><a href=\"wulibi://my.com/?arg0=information1\">打开app</a><br/></body></html>";
方法:通过webView的oadDataWithBaseURL方法去加载数据,如果设置好格式就不会显示中文乱码:
具体操作如下:
webView1.loadDataWithBaseURL(null,st,
"text/html", "utf-8",null);