Problems with UNICODE Characters for superscript 4,5,6,7,8,9

A

Alonso

Hi,

We have an application that has its own character map. Everything is working
fine until yesterday. We got a new requirement which was to add superscript
numbers from 0-9. Numbers 1,2,3 are display correctly.

The issue is the 0, 4-9. With those characters I got the square on my Rich
Text Box.

The funny thing is, if I copy/paste one of them from Windows Character Map,
after that all character will work using our character map.

The way I'm passing the characters from our C.M to the Rich Text Box is the
follow:

Clipboard.SetText(CType(sender, UIButton).Text, TextDataFormat.UnicodeText)

and

Me.m_CurrentRTB.Text =
Clipboard.GetData(System.Windows.Forms.DataFormats.UnicodeText)

Does anyone had this issue before?

Thanks for the help

Alonso
 
M

Morten Wennevik [C# MVP]

Hi Alonso,

Only 1, 2 and 3 are more commonly supported in most fonts as they are used
indicating squared, cubed numbers (not sure what 1 is used for). When you
paste these characters you are most likely adding font information so for
these characters the fonts are changed. Try setting the Font used by the
RichTextBox to the same font you found in the character map containing the
other superscript numbers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top