C# NET图表控件&;字符编码问题
我正在尝试将ASP.NET图表控件用于一个针对多种语言本地化的网站。然而,当我们最近添加了中文本地化时,我们的图表出现了问题——所有标签都显示了我们实际需要中文字符的方框,如我下面的示例所示(请注意,我不知道任何中文,所以这可能说明了什么): default.aspx(无代码隐藏):C# NET图表控件&;字符编码问题,c#,asp.net,character-encoding,charts,mschart,C#,Asp.net,Character Encoding,Charts,Mschart,我正在尝试将ASP.NET图表控件用于一个针对多种语言本地化的网站。然而,当我们最近添加了中文本地化时,我们的图表出现了问题——所有标签都显示了我们实际需要中文字符的方框,如我下面的示例所示(请注意,我不知道任何中文,所以这可能说明了什么): default.aspx(无代码隐藏): <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ChineseChart._Defau
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ChineseChart._Default" %>
<%@ Register Assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Chart runat="server" Height="270px" Palette="None" PaletteCustomColors="0, 192, 96; 0, 96, 48">
<legends>
<asp:Legend Alignment="Center" Docking="Bottom" Name="Legend1" BorderColor="Black">
</asp:Legend>
</legends>
<titles>
<asp:Title Name="Title1" Text="我的示例图表">
</asp:Title>
</titles>
<series><asp:Series Name="富" ChartType="Pie" Legend="Legend1">
<points>
<asp:DataPoint AxisLabel="酒吧" MapAreaAttributes="" ToolTip="" Url="" YValues="65" />
<asp:DataPoint AxisLabel="富" MapAreaAttributes="" ToolTip="" Url="" YValues="24" />
</points>
</asp:Series>
</series>
<chartareas><asp:ChartArea Name="ChartArea1"></asp:ChartArea></chartareas>
</asp:Chart>
</div>
</form>
</body>
</html>
(来源:)
这向我指出了字符编码问题,但我在图表对象中找不到任何更改控件编码的内容
有什么办法可以解决这个问题吗
更新:我们还有希腊语和希伯来语的网站,这两种语言都没有在图表上给我们带来任何问题。如果您的计算机上没有安装非拉丁字母语言包,特别是亚洲语言,唯一可用的显示这些字符的字体是Arial Unicode MS
这种字体的真正缺点是,当显示使用拉丁字母的英语等语言时,它看起来像垃圾。这台计算机上安装了中文支持语言包吗?它没有-&那有用!非常感谢你!