android - Why doesn't Webview display strings other than in English? -


i have used following code display string in android webview:

    webview.loaddata(anenglishstring + "<br />" + apersianstring, "text/html", "utf-8"); 

also note tried substitute "utf-8" with: "unicode", "utf8", "utf-16", "ansi", ... each time got following output in webview:

this message in english
%%#:-=%@+=%-#@##%@%

by way, tried use:

    webview.loaddatawithbaseurl(null, ..., null); 

as as:

    webview.getsettings().setdefaulttextencoding(); 

but i'm still getting same wired characters persian message.

i used following code solve problem:

    webview.loadurl("data:text/html;charset=utf-8," + nonenglishstring); 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -