I have used the following code to display a string in android Webview:
webView.loadData(anEnglishString + "<br />" + aPersianString, "text/html", "utf-8");
Also Note that I tried to substitute "utf-8" with: "unicode", "utf8", "utf-16", "ansi", ... But each time I got the following output in WebView:
This message is in English
%%#:-=%@+=%-#@##%@%
By the way, I also tried to use:
webView.loadDataWithBaseURL(null, ..., null);
as well as:
webView.getSettings().setDefaultTextEncoding();
But I'm still getting the same wired characters for Persian message.
aPersianStringproperly constructed using some persian known encoding? or usingutf-8