3

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?

dda
  • 6,030
  • 2
  • 25
  • 34
Raj
  • 22,346
  • 14
  • 99
  • 142
  • 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.com – Hans Passant Dec 22 '12 at 11:54
  • @HansPassant Calibri didn't show that character. When I switched the Font to Arial, the Unicode character displayed properly. – Raj Dec 23 '12 at 16:35
  • 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 Dec 23 '12 at 18:10
  • 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? – Raj Dec 24 '12 at 06:20

2 Answers2

4

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

Esailija
  • 138,174
  • 23
  • 272
  • 326
1

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

Community
  • 1
  • 1
Mahdi Tahsildari
  • 13,065
  • 14
  • 55
  • 94