Hi There, We are using Titanium 3.0.2 SDK version and we are building an app for Iphone and Android. Part of the app we are using Web view to display web content. The target devices are Iphone from 4.x and Android 2.x to 3.x We are targeting "HTML Page Source(Mark up code)" to a webview to convert it into a document and display it on the window. We will receive the HTML Page source content from backend and we will store them in device local db and when content to be displayed we will pull out the HTML Markup code stored in db in the form of a string and target it to a web view by setting the HTML property.
A Sample code goes some thing as below:
var win1 = Ti.UI.createWindow();
var firstView = Ti.UI.createWebView({
html : '<Html><head>.........</head><body>......</body></Html>'
});
win1.add(firstView);
win1.open();
What ever HTML source content that we are passing on is properly rendered on Iphone device with all the styling elements.
But on Android the Encoding is not considered properly and some special characters are displayed when the content is rendered on webview. Example : "Â" --> Replacing "." and 'â€' --> Replacing " ' ", etc..
We tried adding Charset = ISO 8859-1 in the <Meta> tag info but no luck.
Can any one suggest if any extra endocing parameters to be defined around the HTML content or some properties to be set in the Webview to avoid these Special characters replacing the actual content.