Win XP上的WPF中文字符

时间:2014-01-07 11:27:52

标签: c# wpf windows character-encoding

我有一个比较奇怪的问题。我在Win7和XP平台上运行相同的WPF应用程序。该应用程序包括wpf listview,其中一列显示URL。问题出现在XP平台上,其中非unicode Url,特别是中文或韩文显示为正方形。

在Win 7上,正确显示相同的数据。需要提及的是,其他非Unicode字符如希腊语或德语在两个系统上都能正确显示。

有人知道发生了什么吗?感谢

         // Get the stream associated with the response.
        Stream receiveStream = response.GetResponseStream ();

        // Pipes the stream to a higher level stream reader with the required encoding format. 
        StreamReader readStream = new StreamReader (receiveStream, Encoding.UTF8);

1 个答案:

答案 0 :(得分:1)

它可以是用于显示字符的字体。您能否确认在两个系统上使用相同的字体?

我非常确定系统默认字体在从XP到Win 7的更改中从 Tahoma 更改为 Segoe UI

(提示您可以使用字符映射来检查字体是否支持正确的字符)