Android - Characters Such As Å,ä,ö Do Not Render Correctly In Webview
I am using the following code to render my webview in android - webview.loadDataWithBaseURL(null, 'Subject: '+ getSubject() +' Content: '+ getContent() , 'text/html' , 'UTF-8', ''
Solution 1:
make sure the content you recieve, in tag <head> use like this: <meta charset="UTF-8" >
Sorry for my English. :)
Solution 2:
I think it's more of a font problem than code itself. Try putting DejaVuSans.ttf font instead of DroidSansFallback.ttf on the android itself. It should fix it. I'd search forum.xda-developers.com for a solution.
Solution 3:
It was due to how I was retrieving the message from the server. I was reading the Http response character by character so it broke up the encoding. When I started reading line by line it worked fine!
Post a Comment for "Android - Characters Such As Å,ä,ö Do Not Render Correctly In Webview"