WPF RIchtextbox如何显示Unicode?

时间:2020-12-17 21:23:57

I use the WPF RichTexBox control in WPF project. The problem I get stuck in is it cannot display the unicode as the System.Windows.Forms.RichTextbox in Win Project.

我在WPF项目中使用WPF RichTexBox控件。我遇到的问题是它无法在Win Project中将unicode显示为System.Windows.Forms.RichTextbox。

E.g : When I copy a paragraph of Chinese language and paste it to the WPF Richtextbox. The font is break and it cannot display. But when I use System.Windows.Forms.RichTextbox control then I display ok.

例如:当我复制一段中文并将其粘贴到WPF Richtextbox时。字体是中断,无法显示。但是当我使用System.Windows.Forms.RichTextbox控件时,我显示确定。

So, how can I resolve this problem in WPF project.

那么,我如何在WPF项目中解决这个问题。

1 个解决方案

#1


I would guess that you're using a font that doesn't support Unicode. Try making sure you're using a Unicode-capable font to display the Chinese characters. (If you don't know, try a few common fonts, like Tahoma, in wordpad.)

我猜你正在使用不支持Unicode的字体。尝试确保使用支持Unicode的字体来显示中文字符。 (如果您不知道,请在wordpad中尝试一些常见字体,如Tahoma。)

#1


I would guess that you're using a font that doesn't support Unicode. Try making sure you're using a Unicode-capable font to display the Chinese characters. (If you don't know, try a few common fonts, like Tahoma, in wordpad.)

我猜你正在使用不支持Unicode的字体。尝试确保使用支持Unicode的字体来显示中文字符。 (如果您不知道,请在wordpad中尝试一些常见字体,如Tahoma。)