Is it possible to get a copyright symbol in C# Console application?
c#, console
Solution
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");
Problem
Is it possible to add a copyright symbol or other "special" symbol in any way in a C# console application?