I have a WebView in which I load html page from the res/raw resource.
The WebView was not supporting Japanese text. Hence I read the html file and converted the text to utf-8 and displayed it using:
webView.loadDataWithBaseURL( null, readDataFromFile("res/raw/page.html"),
"text/html", "UTF-8", null );
The function readDataFromFile() reads the html file and returns String in UTF-8 format.
This works for displaying the Japanese text, but fails for displaying the Spanish and Danish text.
Some ASCII charaters are displayed in between with the solution above.
I cannot use loadURL() as it was having problems with displaying the Japanese text.But was working with Spanish and Danish.
Can someone help me with a simplified solution so that i can display properly all the languages in the WebView correctly.
Thanks in advance,
Sneha
Found a solution myself, just convert the language specific text to utf-8 format. Once this is done it displays all the text correctly in the webview. Also save the html file in eclipse as utf-8.