Click here to Skip to main content
15,889,528 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hello people . i am using web view in my android application and i have to show some persian (Farsi , فارسی ) words ! but it doesn't show them correctly ! it just shows some unknown symbols ?! what should i do to fix it ?!
it is my code :
Java
String txt="<html><body>"+"سلام بر برنامه نویسان اندروید  "+"</body></html>";
WebView wv;
wv=new WebView(this);
wv.loadData(txt, "text/html", "utf-8");
LinearLayout ll=(LinearLayout) findViewById(R.id.myll);
ll.addView(wv);
Posted

1 solution

Java
wv.loadDataWithBaseURL(null,txt, "text/html", "utf-8",null);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900