Encoding issue with WebView's loadData

后端 未结 8 520
星月不相逢
星月不相逢 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

    I have display © 2011 and it was displaying ©.

    With the below code i have achieved displaying correct value © 2011

    webViewContent.loadDataWithBaseURL(null, html, "text/html", "utf-8", null);
    

提交回复
热议问题