是否可以在 C# 控制台应用程序中以任何方式添加版权符号或其他特殊"符号?
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("©");
}
}
}
完美地为我工作.无论控制台窗口设置为光栅字体还是 Unicode.
works for me flawlessly. Regardless of whether the console window is set to raster fonts or Unicode.
如果要输出 Unicode,应将控制台输出编码设置为 UTF-8 或 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;
或
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");
这篇关于是否可以在 C# 控制台应用程序中获得版权符号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!