Is it possible to add a copyright symbol or other "special" symbol in any way in a C# console application?
namespace test { class test { public static void Main() { System.Console.WriteLine("©"); } } }
works for me flawlessly. Regardless of whether the console window is set to raster fonts or Unicode.
If you want to output Unicode, you should set the console output encoding to UTF-8 or Unicode.
System.Console.OutputEncoding = System.Text.Encoding.UTF8;
or
System.Console.OutputEncoding = System.Text.Encoding.Unicode;
And if you want to stay clear from source code encoding issues you should specify the character code point directly:
System.Console.WriteLine("\u00a9");
You can copy it from here if you like:
©
(You can hold down ALT, then type 0169, then release the ALT key)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With