unicode character problem

  • Thread starter Thread starter sheena
  • Start date Start date
S

sheena

Hi,

I am finding that quite a few unicode characters are not being
recognised in my .NET c# application.

Here's a snippet that demonstrates my problem:

String sigma_str = "Sigma (\x03a3)";
String pi_str = "Pi (\x03a0)";
String str = sigma_str + " : " + pi_str;
Console.WriteLine(str);

Here's the output:

Sigma (S) : Pi (?)
 
Hi Sheena,

There is no ASCII translation for PI. The question mark is an indication
that the unicode character does not exist or cannot be shown with the
current codepage.

In fact, even a MessageBox for some odd reason does not display either
Sigma nor PI, but using Graphics.DrawString you can see them fine.
 
Hi,

Ah well, that explains that.

Thanks,

Sheena

Morten said:
Hi Sheena,

There is no ASCII translation for PI. The question mark is an indication
that the unicode character does not exist or cannot be shown with the
current codepage.

In fact, even a MessageBox for some odd reason does not display either
Sigma nor PI, but using Graphics.DrawString you can see them fine.
 
Back
Top