Android WebView LoadData written loaddata (data, "text/html; Charset=utf-8 ", null); it's not garbled.
The reasons are as follows:
Garbled
If you use Loaddatawithbaseurl, if you do not pass in the URL, the refresh will cause a white screen, because the refresh is called the Reload method, reload is based on the incoming URL to reload once again Loadurl (URL), do not pass in the URL, The default URL is About:blank
You can use LoadData, refresh is only from the cache, but in more than 4.0, if the API is written in the LoadData (data, "UTF-8", null), the time will be garbled, if written loaddata (data, "text/html; Charset=utf-8 ", null); LoadData The final mechanism is to put the incoming three parameters together, and then Loadurl operation, the parameter is data," text/html; Charset=utf-8 ", null these three are assembled, joined text/html; Charset=utf-8 is equivalent to restricting the character of the page
Android WebView LoadData garbled Problem Solving method