Unicode Question

  • Thread starter Thread starter nebiyou1
  • Start date Start date
N

nebiyou1

When I execute the following program, I get garbage for the ethiopic
character whereas I get the right ones for the arabic characters. I
have the ethiopic fonts installed. Any ideas why I am getting garbage
instead of the right charcter for the ethiopic character? Do I need to
set something in visual studio?



private void button1_Click(object sender, System.EventArgs e)
{
char ha;
char ra;
char dal;
char wao;
string word;
ha = '\u1200'; //ethiopic
ra = '\u0631'; //arabic
dal = '\u062F'; //arabic
wao = '\u0648'; //arabic
word = ha.ToString() + ra.ToString()+dal.ToString()+
wao.ToString();
MessageBox.Show(word);
}
 
(e-mail address removed) wrote in
When I execute the following program, I get garbage for the ethiopic
character whereas I get the right ones for the arabic characters. I
have the ethiopic fonts installed. Any ideas why I am getting garbage
instead of the right charcter for the ethiopic character? Do I need to
set something in visual studio?
You might have the fonts installed, but nothing tells to the message box that
it should use them.
Try designing a form and explicitely setting the font to try.
 
When I execute the following program, I get garbage for the ethiopic
character whereas I get the right ones for the arabic characters. I
have the ethiopic fonts installed. Any ideas why I am getting garbage
instead of the right charcter for the ethiopic character? Do I need to
set something in visual studio?

Having just spoken with someone on MSN with a similar issue, they found
that a RichTextBox (but not a normal TextBox or Label) worked. It might
be worth giving that a try...
 
This solution worked. Thank you.
p.s.
I could not do it for MessageBox as there was no place to set the
property
of the messagebox...
 
This solution worked. Thank you.
Glad to help.
I could not do it for MessageBox as there was no place to set the
property of the messagebox...
I am afraid there are only two ways here:
- design your own dialog, to look like a message box
(problems with resizing to look good no matter how long/short the
text is, like a standard MessageBox)
- message hook
 
Back
Top