Encoding issue with WebView's loadData

后端 未结 8 501
星月不相逢
星月不相逢 2020-12-09 16:21

I\'m loading some data, containing latin-1 characters, in a WebView using

String uri = Uri.encode(html);
webview.loadData(uri, \"text/html\", \"ISO-8859-1\")         


        
8条回答
  •  一生所求
    2020-12-09 17:18

    Only way to have it working, as commented here:

    webview.loadDataWithBaseURL("fake://not/needed", html, "text/html", "utf-8", "");
    

    No URI encoding, utf-8... loadData bug?

提交回复
热议问题