1

I need to print a char in console but when I do it, the console print other char. The char in question is ³ and I use:

Console.WriteLine(Convert.ToChar(0xb3));

When I use the last code the console print "3".

If I try print the char 0xb2 it works.

Trewqa
  • 214
  • 3
  • 16

2 Answers2

0

Check if this works:

Console.OutputEncoding = Encoding.Unicode;
Console.WriteLine("\u00b3");
w.b
  • 11,026
  • 5
  • 30
  • 49
0

See

You'll also need to make sure that your console is configured to use a TrueType font that supports Unicode (or at least, that subset of Unicode in which you're interested).

Community
  • 1
  • 1
Nicholas Carey
  • 71,308
  • 16
  • 93
  • 135