2
votes

I have a Unicode character in the settings of a VB.NET application.

unicode in settings

With the following code:

CurrencyText.Text = My.Settings.Options_Display_Currency

I try to render this value in a text box with Calibri font, I see a box like this:

enter image description here

How to enable the Windows Form to display Unicode characters?

2
Something is borken in your machine setup. When the default font doesn't contain a glyph, Windows goes looking for another font that has the glyph and uses it instead. Works fine for TextBox and clearly you do have such a font. This is registry stuff, ask about this at superuser.comHans Passant
@HansPassant Calibri didn't show that character. When I switched the Font to Arial, the Unicode character displayed properly.Lenin Raj Rajasekaran
Well, that wasn't the point. I can use a TextBox with Font = Calibri on my machine and it has no trouble showing glyphs that are not in that font. As it is supposed to. Which is why I commented that there's something wrong with your machine.Hans Passant
Oh Okay. Thanks. Is there a way to figure what is wrong so I can fix it and also fix in all my customer's system?Lenin Raj Rajasekaran

2 Answers

4
votes

It means the font used to display the character doesn't contain glyph for the character. Try a font like Arial or any font listed here http://www.fileformat.info/info/unicode/char/20b9/fontsupport.htm

1
votes

Change your TextBox with a RichTextBox and it will probably work.
also Default encoding can be helpful.