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
  • 10,668
  • 5
  • 27
  • 47
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
  • 65,549
  • 13
  • 92
  • 133