If you are developing the app compatible with 1.5 that has WebView within – please pay attention!
Function loadData and loadDataWithBaseURL behave differently.
If you have special characters in your String – loadData will fail in 1.5. You will get something like “the page cannot be displayed… blablabla… data:text/html;utf-8,%3Chtml%3E%3Cbody…” (http://code.google.com/p/android/issues/detail?id=4401)
so instead of using:
webView.loadData(mData, "text/html", "utf-8");
webView.loadDataWithBaseURL(null, mData, "text/html", "utf-8", null);
loadData sends LOAD_URL message to the WebViewCore, as opposed to loadDataWithBaseURL that uses LOAD_DATA.
In version 1.6 LOAD_URL behavior was changed – now it handles special characters correctly.