Show special characters in a webview

假装没事ソ 提交于 2020-01-06 23:43:38

问题


I have a text (sInfoText) with a lots of special characters like 'è'.

I would like to show this special character also in a webview, but I get rubbish characters. Howto convert this special characters programmatically?

wvinfo.loadData(sInfoText,"text/html", "UTF-8");

回答1:


try

wvinfo.loadData(sInfoText, "text/html; charset=UTF-8", null);

this ll work on above 4.0.0



来源:https://stackoverflow.com/questions/27998872/show-special-characters-in-a-webview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!