是否可以在 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模板网!
读取 XML 时忽略空格Ignore whitespace while reading XML(读取 XML 时忽略空格)
带有检查空元素的 XML 到 LINQXML to LINQ with Checking Null Elements(带有检查空元素的 XML 到 LINQ)
在 C# 中读取带有未闭合标签的 XMLReading XML with unclosed tags in C#(在 C# 中读取带有未闭合标签的 XML)
在 C# 中使用 Html 敏捷性解析表格、单元格Parsing tables, cells with Html agility in C#(在 C# 中使用 Html 敏捷性解析表格、单元格)
使用 LINQ 从 xml 中删除元素delete element from xml using LINQ(使用 LINQ 从 xml 中删除元素)
解析格式错误的 XMLParse malformed XML(解析格式错误的 XML)