控制台显示“C”而不是版权符号? [英] Console displaying 'C' instead of copyright symbol?

查看:324
本文介绍了控制台显示“C”而不是版权符号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

using System;
I waned to print the copyright symbol on the console through ANCII, here is my code--


using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace copyright
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("\u00a9");
        }
    }
}







问题是, 'c'正在打印而不是版权符号。我该如何解决这个问题?



我的尝试:



我将字体更改为Lucida Console,因为我在某处读到它支持所有字符。但它仍然没有打印版权符号。




The problem is, that 'c' is getting printed instead of the copyright symbol. How can I fix this?

What I have tried:

I changed the font to Lucida Console, as I read somewhere that it supports all the characters. But still it does not print the copyright symbol.

推荐答案

你的代码工作(在Windows 7上),我测试了它,但你的问题可能是由Windows文化引起的设置。

试试这个:

Your code works (on Windows 7), I tested it, but your problem might be caused by the Windows culture setting.
Try this:
// Sets the culture to English
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en");



这个:


And this:

Console.OutputEncoding = Encoding.UTF8;


这篇关于控制台显示“C”而不是版权符号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆