0

I am having a little problem with the WebView in android.

When I load the following text in the WebView I am getting a strange character for e.g. the 's, and also some later on. The HTML is, printed to the Logger:

This week’s show is hosted by Fr. Gabriel Gillen, O.P. and Fr. Walter Wagner, O.P .  The readings are: Acts 2:14A, 36-41; 1 Peter 2:20B-25; John 10:1-10.  Click here to listen!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=opeast.org&blog=23933483&post=18874&subd=dominicandaily&ref=&feed=1" width="1" height="1" />

The code to log and load the HTML is:

Log.d(iDomsAndroidApp.TAG, "HTML: " + article.getDescription());
webView.loadData(html, "text/html", "utf-8");

The resulting screenshot is: enter image description here

Can anybody give me a hint how to fix this problem?

Luuk D. Jansen
  • 4,402
  • 8
  • 47
  • 90
  • 1
    See [enter link description here][1] [1]: http://stackoverflow.com/questions/7625946/encoding-issue-with-webviews-loaddata – Luuk D. Jansen Jul 18 '14 at 13:59

1 Answers1

2

Try out by,

webView.loadData(myHtmlString, "text/html; charset=UTF-8", null);
Beena
  • 2,334
  • 24
  • 50