1

How do i output special characters to the console in visual basic. because simply putting console.writeline("Copyright symbol") outputs a C instead of the symbol. how can i fix this.

  • this isnt a duplicate honostly. i just want to know if it works for all characters not just the copyright. – Reese Houseknecht Oct 14 '16 at 14:38
  • The console has to be using a font which has glyphs for all the characters you want to display. It shouldn't take you long to write a small program to test that. – Andrew Morton Oct 14 '16 at 14:46

2 Answers2

0

The real copyright symbol is a unicode character. Use \u00A9 instead of C to print it out correctly.

washcloth
  • 2,730
  • 18
  • 29
0

You can use the ChrW() function with the Unicode decimal value of the symbol you want to print, for the Copyright symbol it is 169.

console.writeline(ChrW(169))

You can find the Unicode decimal values for other symbols on this website.

Carrosive
  • 889
  • 2
  • 10
  • 25