这是我正在使用的代码,阿拉伯字符显示为问号。我尝试在互联网上搜索,但我没有找到解决方案。
提前致谢。
<html>
<head>
<title>Graph</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="viewport"
content="width=device-height,minimum-scale=0.5,maximum-scale=3.0,user-scalable=yes" />
<script type='text/javascript' src='http://www.google.com/jsapi'></script>
<script type='text/javascript'>
google.load('visualization', '1', { packages: ['corechart'] });
//google.load('visualization', '1', { packages: ['corechart'], language: 'ar' });
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([['التواريخ',
'التواريخ', 'المبلغ'],
['2004', 1000, 400], ['2005', 1170, 460], ['2006', 660, 1120], ['2007', 1030, 540]]);
var options = { title: 'الاستهلاك الشهري', hAxis:
{ title: 'التواريخ', titleTextStyle: { color: 'red' } } };
var chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
</script>
</head>
<body>
<div id='chart_div' style='width: 100%; height: 100%;'></div>
</body>
</html>
答案 0 :(得分:0)
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
应该是
<meta http-equiv='content-type' content='text/html; charset=UTF-16' />