Display Special Characters (Korean Letters) in RichTextBox

Posted by Peter Lee on Stack Overflow See other posts from Stack Overflow or by Peter Lee
Published on 2010-09-05T06:44:16Z Indexed on 2011/01/04 2:53 UTC
Read the original article Hit count: 552

Hi,

My question might be a little bit confusing, but I think it's still worth of paying some attention.

Basically I'm designing a program to display all printable Unicode characters in a RichTextBox.

I'm using VC# 2010 Express Edition.

However, the RichTextBox has a critical problem: some special characters cannot be displayed correctly.

For example, some Korean Characters (??????????????????????????????), can be displayed correctly in Microsoft Word. After I copy to the RichTextBox, the characters cannot be displayed correctly. However, when I copy back to Microsoft Word, it can be displayed correctly.

Therefore, it's a display problem (the characters themselves are correct). I guess it might be a font problem.

Some related property info: RichTextBox.Font.GdiChaSet RichTextBox.Font

How can I solve it? So that all printable Unicode characters can be displayed correctly (using different fonts for different CharSets are acceptable).

Actually, I need further assistance about removing all formatting when pasting rtbxFileContent.Paste(DataFormats.GetFormat(DataFormats.Text)); // DataFormats.UnicodeText

I still need to have all printable characters to be displayed correctly, but without any formatting (except font).

Thanks.

Hope I made myself understood.

© Stack Overflow or respective owner

Related posts about c#

Related posts about richtextbox