Hi,
Having trouble with some text from my google fusion table when
displaying it in a html page. The Swedish characters are being
displayed incorrectly in Safari, Chrome and possibly more browsers.
I've included the "<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />" in the head section, and the static text on the
page is displaying correctly, but there's something in the script that
makes the encoding go wrong.
--- Here's the script ---
google.load('visualization', '1');
function changeData(Stad) {
var whereClause = "";
if(Stad) {
whereClause = " WHERE 'Stad' = '" + Stad + "'";
}
var queryText = ("SELECT 'Stad', 'Replokaler', 'Kontakt' FROM
830099" + whereClause);
var query = new google.visualization.Query('http://www.google.com/
fusiontables/gvizdata?tq=' + queryText);
query.send(getData);
}
function getData(response) {
numRows = response.getDataTable().getNumberOfRows();
numCols = response.getDataTable().getNumberOfColumns();
fusiontabledata = "<table><tr><td><b>";
for(i = 0; i < numCols; i++) {
fusiontabledata += response.getDataTable().getColumnLabel(i) + "</
b></td><td><b>";
}
fusiontabledata += "</b></td></tr><tr><td>";
for(i = 0; i < numRows; i++) {
for(j = 0; j < numCols; j++) {
fusiontabledata += response.getDataTable().getValue(i, j) + "</
td><td> ";
}
fusiontabledata += "</td></tr></table>";
}
document.getElementById('ftdata').innerHTML = fusiontabledata;
}
--- end of script ---
The body basically consists of:
<div id="code"></div>
I'd be very excited to hear some thoughts about this!
Thanks,
Edward
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.